added explicit 'zorder' kwarg to `Colection` and `LineCollection`. #1654

Merged
merged 2 commits into from Jan 14, 2013

Projects

None yet

3 participants

@tacaswell
Matplotlib Developers member

Vaguely related to issue #1622. Changed the location of the default zorder of Collection and LineCollection from a class level-member, to explicitly being a keyword argument.

I think this makes it clearer, but isn't strictly necessary, because if zorder is included as a kwarg, it will get set by the self.update anyway.

Thomas A Caswell added explicit 'zorder' kwarg to `Colection` and `LineCollection`.
removed class level zorder assignment.

It is not strictly necessary for LineCollection to take zorder as a
kwarg, but added to keep the default zorder the same
b3dafb9
@pelson pelson commented on an outdated diff Jan 14, 2013
lib/matplotlib/collections.py
@@ -959,6 +964,9 @@ def __init__(self, segments, # Can be None.
*pickradius* is the tolerance for mouse clicks picking a line.
The default is 5 pt.
+ *zorder*
+ 2 the zorder of the LineCollection
@pelson
pelson Jan 14, 2013

This line should probably be more along the lines of:

```The zorder of the LineCollection. Default is 2."""

@pelson
Matplotlib Developers member

Good stuff @tacaswell - I'm amazed we have come so far without zorder for Collections!

Thomas A Caswell documentation tweak bd097a7
@dmcdougall
Matplotlib Developers member

Thanks @tacaswell, merging.

@dmcdougall
Matplotlib Developers member

(The Travis failures are duds)

@dmcdougall dmcdougall merged commit 06d7f9c into matplotlib:master Jan 14, 2013

1 check failed

Details default The Travis build failed
@tacaswell tacaswell deleted the tacaswell:collection_zorder_kwarg branch Jan 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment