X Tutup
Skip to content

text object clipping #8506

@ahed87

Description

@ahed87

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup