File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
pandas/tests/plotting/frame Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 33instead of one Line2D per column (PR #61764).
44"""
55
6- from matplotlib .collections import LineCollection
7- import matplotlib .pyplot as plt
86import numpy as np
7+ import pytest
98
109import pandas as pd
1110
11+ # Skip this entire module if matplotlib is not installed
12+ mpl = pytest .importorskip ("matplotlib" )
13+ plt = pytest .importorskip ("matplotlib.pyplot" )
14+ from matplotlib .collections import LineCollection
15+
1216
1317def test_linecollection_used_for_wide_dataframe ():
1418 rng = np .random .default_rng (0 )
1519 df = pd .DataFrame (rng .standard_normal ((10 , 201 )).cumsum (axis = 0 ))
1620
1721 ax = df .plot (legend = False )
1822
19- # one LineCollection, zero Line2D objects
23+ # exactly one LineCollection, and no Line2D artists
2024 assert sum (isinstance (c , LineCollection ) for c in ax .collections ) == 1
2125 assert len (ax .lines ) == 0
2226
You can’t perform that action at this time.
0 commit comments