MCPcopy Index your code
hub / github.com/plotly/plotly.py / test_linestyle

Function test_linestyle

plotly/matplotlylib/mplexporter/tests/test_utils.py:15–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14
15def test_linestyle():
16 linestyles = {
17 "solid": "none",
18 "-": "none",
19 "dashed": "5.550000000000001,2.4000000000000004",
20 "--": "5.550000000000001,2.4000000000000004",
21 "dotted": "1.5,2.4749999999999996",
22 ":": "1.5,2.4749999999999996",
23 "dashdot": "9.600000000000001,2.4000000000000004,1.5,2.4000000000000004",
24 "-.": "9.600000000000001,2.4000000000000004,1.5,2.4000000000000004",
25 "": None,
26 "None": None,
27 }
28
29 for ls, result in linestyles.items():
30 (line,) = plt.plot([1, 2, 3], linestyle=ls)
31 assert_equal(utils.get_dasharray(line), result)
32
33
34def test_axis_w_fixed_formatter():

Callers

nothing calls this directly

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected