-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: ax.text() Is Not Rendered If X Specified With ax.plot() #25127
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
Comments
|
Oh I see that Thank you for your help. |
Should we have an optional keyword argument that does relim? It seems handy in some cases. Not only is manual limit setting by the user cumbersome and error-prone, it also deactivates future auto-scaling, which may not be desired. |
+1 cause like ax.text can also be used to plot word scatters |
You could autolim on the text anchor, but cannot autolim on the text extent without getting stuck in loops like we did for scatter fixed-size markers. |
If you want to put text relative to a point, see We have been through the discussion about if text is "data" or "decoration" a couple of times and in the past have come down on the "decoration" side of things which says we should not take text into account in the auto-limit code. I will make a new issue with thoughts on how to make this happen. |
Bug summary
ax.text() is not rendered if x values are supplied to ax.plot()
Code for reproduction
Actual outcome
Text is not displayed.
Expected outcome
Text is displayed.
Additional information
I narrowed it down to plot with x values means text is not displayed.
Operating system
Windows
Matplotlib Version
3.6.3
Matplotlib Backend
TkAgg
Python version
3.9.7
Jupyter version
N/A
Installation
pip
The text was updated successfully, but these errors were encountered: