Skip to content

Convert SubplotZero example into centered-spines-with-arrows recipe. #17170

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

Closed

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Apr 17, 2020

PR Summary

Closes #17157 (I don't think this can be turned into a style sheet without very deep additions to the style system).
Thanks @ImportanceOfBeingErnest for the awesome idea of just using markers for the arrows :)

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added this to the v3.3.0 milestone Apr 17, 2020
@ImportanceOfBeingErnest
Copy link
Member

I'd be against removing the original example. This is part of the mpl_toolkits.axis_artist module documentation. Those toolkit modules are underdocumented anyways, and often enough those examples are the only way to find out how a feature was originally meant to be used.

Instead I'd propose to
a) Move the mpl_toolkits examples even further down in the gallery.
b) In a case like this one, where there would be a better/alternative way to do something similar with the core library, link to it, maybe even recommending to use the linked example.

@anntzer
Copy link
Contributor Author

anntzer commented Apr 17, 2020

If the point of axisline_style is to draw arrows at the ends of ticks, I'd rather deprecate it -- as this shows, this can be reasonably achieved with standard tools, and then we won't have people asking about why rcParams don't apply to them as in #17157. (One alternative would be to consider the fact that rcParams don't apply as a bug and hope that someone fixes it, but I don't even want to think about the backcompat issues there. An other alternative being as always to not bother about API consistency but heh.)

@ImportanceOfBeingErnest
Copy link
Member

It seems the main motivation for the axisline stuff is to have a decoupled set of artists, where spines, but also ticks can have arbitrary orientations, instead of the standard spines. The ZeroSubplot just seems to be an easy consequence of that concept.
My point is, it's not necessary to even bother about it... If you keep it encapsulated in its module and don't mix documentation, it can live on as it is. I'm sure there are people using it.

The only thing we really want at this point is to not confuse users, hence my proposal from above.

@anntzer
Copy link
Contributor Author

anntzer commented Apr 17, 2020

Do you want to take over this PR then? Your docs proposal above is still an improvement, but I'll leave it to you (or anyone else who wants to do it :))

@ImportanceOfBeingErnest
Copy link
Member

Ok, I created #17180.

The order of section in the gallery still needs to be done, but I would first need to think about that for a bit, so that PR may come later.

@anntzer
Copy link
Contributor Author

anntzer commented Apr 17, 2020

Superseded.

@anntzer anntzer closed this Apr 17, 2020
@anntzer anntzer deleted the centered-spines-with-arrows branch April 17, 2020 21:16
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.

"Classical" zero-axis plot with arrows and symmetric ticks seems to be impossible
2 participants