Skip to content

Commit e1ca3e7

Browse files
committed
TST: add test for no subslice if we have a non-standard transform
1 parent 7c3147b commit e1ca3e7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/matplotlib/tests/test_lines.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from matplotlib.markers import MarkerStyle
1717
from matplotlib.path import Path
1818
import matplotlib.pyplot as plt
19+
import matplotlib.transforms as mtransforms
1920
from matplotlib.testing.decorators import image_comparison, check_figures_equal
2021

2122

@@ -131,6 +132,13 @@ def test_drawstyle_variants():
131132
ax.set(xlim=(0, 2), ylim=(0, 2))
132133

133134

135+
def test_no_subslice_with_transform():
136+
fig, ax = plt.subplots()
137+
t = mtransforms.Affine2D().translate(2000.0, 0.0)
138+
l = ax.plot(range(2000), transform=t+ax.transData)
139+
assert len(l[0].get_path()) == 2000
140+
141+
134142
def test_valid_drawstyles():
135143
line = mlines.Line2D([], [])
136144
with pytest.raises(ValueError):

0 commit comments

Comments
 (0)