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
Matplotlib 1.5.1 ignores annotation_clip parameter #6151
Comments
by 'in a jupyter notebook' you mean with the Adding ax.set_xlim([0, 1.4])
ax.set_ylim([0, 1.4]) you will see the start of your text. I suspect you should be using import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
x = np.arange(0, 1, 0.001)
y = (0.5 * np.sin(x)) + (np.cos(x) ** 2)
ax.plot(x, y)
ax.annotate('Test annotation', xy=(1, 1),
xycoords='axes fraction',
xytext=(0, 12),
textcoords='offset points',
ha='right',
annotation_clip=False)
plt.show() instead. |
Thank you! |
If the documentation confused you, can you suggest a way to clarify it? Not auto 'shrink wrapping' is frequently a feature, for example when making animations (where every frame must be exactly the same pixel count) or for embedding in other documents where matching font size is important. |
I was guided by this api section. To my sense, something like:
after:
will be more than enough. I played a bit and understood the mechanics behind this option - it draws the text, but the text is only shown when its position is within current figure dimensions. Thanks again! |
I think that statement (modulo an addendum about bbox_inches='tight') would Would you like to put together a PR updating that documentation? On Sun, Mar 13, 2016 at 5:25 PM, mikoff notifications@github.com wrote:
|
Hello!
I think there is a problem with matplotlib annotation_clip value while using it to place a comment outside the main plot area. Surprisingly, but it works in jupyter notebook.
Matplotlib version: 1.5.1
Platform: Linux
Backend: Qt, TkAgg
Installed using: pip
To help us understand and resolve your issue please check that you have provided
the information below.
Minimal working example:
The text was updated successfully, but these errors were encountered: