8000 Incorrect text clipping in presence of multiple subplots · Issue #6794 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Incorrect text clipping in presence of multiple subplots #6794
Closed
@anntzer

Description

@anntzer

This is a regression in 2.0b3 compared to 1.5.2 (haven't bisected more)

from matplotlib import pyplot as plt
import numpy as np

np.random.seed(1)
fig, (ax1, ax2) = plt.subplots(2)
for x, y in np.random.rand(10, 2):
    ax1.text(x, y, "foo", clip_on=True)
    ax2.text(x, y, "foo")
plt.show()

1.5.2 displays everything fine
152
2.0b3 clips away all text objects in the top axes
20b3
(so I'm marking this as 2.0 but feel free to change it)

The texts actually appear to be clipped to the "wrong" place and use the wrong zorder: you can see them appear "behind the axes" if you pan the axes as below:
panned

Metadata

Metadata

Assignees

Labels

Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0