MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_LineCollection_args

Function test_LineCollection_args

lib/matplotlib/tests/test_collections.py:1242–1253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1240
1241
1242def test_LineCollection_args():
1243 lc = LineCollection(None, linewidth=2.2, edgecolor='r',
1244 zorder=3, facecolors=[0, 1, 0, 1])
1245 assert lc.get_linewidth()[0] == 2.2
1246 assert mcolors.same_color(lc.get_edgecolor(), 'r')
1247 assert lc.get_zorder() == 3
1248 assert mcolors.same_color(lc.get_facecolor(), [[0, 1, 0, 1]])
1249 # To avoid breaking mplot3d, LineCollection internally sets the facecolor
1250 # kwarg if it has not been specified. Hence we need the following test
1251 # for LineCollection._set_default().
1252 lc = LineCollection(None, facecolor=None)
1253 assert mcolors.same_color(lc.get_facecolor(), 'none')
1254
1255
1256def test_array_dimensions(pcfunc):

Callers

nothing calls this directly

Calls 5

LineCollectionClass · 0.90
get_zorderMethod · 0.80
get_linewidthMethod · 0.45
get_edgecolorMethod · 0.45
get_facecolorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…