Skip to content

Use ticklabels([]) instead of ticklabels('') #20632

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
Jul 12, 2021

Conversation

timhoffm
Copy link
Member

The string variant is not supported according to the docstring. It's
only working by accident due to the list comprehension in

ticklabels = [t.get_text() if hasattr(t, 'get_text') else t

@timhoffm
Copy link
Member Author

Technically not a doc-only change because I also updated the tests.

@timhoffm timhoffm added this to the v3.5.0 milestone Jul 11, 2021
@timhoffm timhoffm force-pushed the ticklabels-empty-str branch from 9137f20 to 5604fcc Compare July 11, 2021 22:55
@@ -68,8 +68,8 @@ def doall():
plt.gca().set_ylim(0., 1.)
plt.gca().set_title("Matplotlib's math rendering engine",
color=mpl_grey_rvb, fontsize=14, weight='bold')
plt.gca().set_xticklabels("", visible=False)
plt.gca().set_yticklabels("", visible=False)
Copy link
Member

Choose a reason for hiding this comment

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

What is visible=False doing here?/is it okay that it's dropped?

Copy link
Member Author

@timhoffm timhoffm Jul 12, 2021

Choose a reason for hiding this comment

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

It sets all of the 0 created ticklabels to invisible 🙃 , i.e. does nothing.

The string variant is not supported according to the docstring. It's
only working by accident.
@timhoffm timhoffm force-pushed the ticklabels-empty-str branch from 5604fcc to e0ddd9b Compare July 12, 2021 06:43
@timhoffm timhoffm merged commit 14b34fd into matplotlib:master Jul 12, 2021
@timhoffm
Copy link
Member Author

Self-merged based on the positive review.

@timhoffm timhoffm deleted the ticklabels-empty-str branch July 12, 2021 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy