Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

automatic zordering with plots

The zorder-option can be used to specify on which layer the elements of a plot are drawn. Is there a way to automatically increase the z-order at each time an element is added to the current Graphics-object? (manually inserting zorder=... is not the solution I want, since it is inflexible (changing the code; shifting code-blocks around))

E.g.

g = Graphics()
g += point((0,0))  # I want zorder=1
g += point((1,0))  # I want zorder=2
# ...