Skip to content

Improve zorder demo #15619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2019
Merged

Improve zorder demo #15619

merged 1 commit into from
Dec 3, 2019

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Nov 6, 2019

PR Summary

  • Add zorder of more artists
  • Reference axisbelow property
  • Code cleanup

`.Line2D`, `.LineCollection` (including minor ticks, grid lines) 2
Major ticks 2.01
`.Text` (including axes labels and titles) 3
`.Legend` 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many of these classes are a bit obscure to users. Can we include the Axes calls that make them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that these classes are a bit obscure. OTOH, the Z-order is exactly attached to these classes. It does not match too well to Axes calls, at least I found no consistent and descriptive way: Line2D can be created by a number of methods: plot (and all of its derivatives like semilogx, ...), axh/vline, scatter (depending on the parameters), ... Major ticks are implicitly made, there's no Axes method that create them. Even though Text and Rectangle are also building blocks for tables, I would not reference table() as a patch-creating method.

Therefore, I sticked to the existing structure of the table and just added more entries. Ideas to improve on that are always welcome.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just do e.g. ax.plot, including minor... without trying to be comprehensive...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to push an update if you like. I'm not feeling like fiddling what commands should get added right now.

Anyway, IMHO this PR stands for for itself and could get merged as an incremental improvement as is. Further improvements are always possible later.

Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one nit

@timhoffm timhoffm added this to the v3.2.1 milestone Dec 2, 2019
Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anyone can merge postci

@timhoffm timhoffm merged commit 032a193 into matplotlib:master Dec 3, 2019
@timhoffm timhoffm deleted the doc-zorder-demo branch December 3, 2019 05:06
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Dec 3, 2019
dstansby added a commit that referenced this pull request Dec 3, 2019
…619-on-v3.2.x

Backport PR #15619 on branch v3.2.x (Improve zorder demo)
@timhoffm timhoffm modified the milestones: v3.2.1, v3.2.0 Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants