Skip to content
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

text object clipping #8506

Closed
ahed87 opened this issue Apr 18, 2017 · 4 comments
Closed

text object clipping #8506

ahed87 opened this issue Apr 18, 2017 · 4 comments

Comments

@ahed87
Copy link
Contributor

ahed87 commented Apr 18, 2017

Hi,
I stumbled over a bit of surprising behaviour when working with some plots with text and panning them.

Apperantly the default behaviour of text is not to have a clipbox/viewbox attached to them (other than figure canvas?).

A small sample code here.

plt.text(.5,.5,'center')
plt.text(.8,.8,'panned')
plt.text(1.1,0.3,'original position outside plot canvas')
plt.plot([0,1])

And the picture after a bit of panning.
figure_1

Clearly the text object is not passed through the same clipping box as the line, I think that should be the default, and if someone wants to place text outside of the current viewbox of the axis, that could be a kwarg somehow.

Thanks for a great library.

@anntzer
Copy link
Contributor

anntzer commented Apr 18, 2017

See #5554.
Closing but feel free to discuss more.

@anntzer anntzer closed this as completed Apr 18, 2017
@WeatherGod
Copy link
Member

WeatherGod commented Apr 18, 2017 via email

@ahed87
Copy link
Contributor Author

ahed87 commented Apr 18, 2017

got it, had a feeling someone would have commented on it earlier...

any objections to an update of the docstring? if not I will give it a go.

@WeatherGod
Copy link
Member

WeatherGod commented Apr 19, 2017 via email

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

No branches or pull requests

3 participants