8000 TST: add test for no subslice if we have a non-standard transform · matplotlib/matplotlib@eba5cdc · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eba5cdc

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

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/matplotlib/tests/test_lines.py

Lines changed: 12 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,17 @@ def test_drawstyle_variants():
131132
ax.set(xlim=(0, 2), ylim=(0, 2))
132133

133134

135+
@check_figures_equal(extensions=('png',))
136+
def test_no_subslice_with_transform(fig_ref, fig_test):
137+
ax = fig_ref.add_subplot()
138+
x = np.arange(2000)
139+
ax.plot(x + 2000, x)
140+
141+
ax = fig_test.add_subplot()
142+
t = mtransforms.Affine2D().translate(2000.0, 0.0)
143+
ax.plot(x, x, transform=t+ax.transData)
144+
145+
134146
def test_valid_drawstyles():
135147
line = mlines.Line2D([], [])
136148
with pytest.raises(ValueError):

0 commit comments

Comments
 (0)
0