There was an error while loading. Please reload this page.
1 parent c0740bf commit b719562Copy full SHA for b719562
1 file changed
plotly/matplotlylib/tests/test_renderer.py
@@ -84,3 +84,20 @@ def test_multiple_traces_native_legend():
84
assert plotly_fig.data[0].mode == "lines"
85
assert plotly_fig.data[1].mode == "markers"
86
assert plotly_fig.data[2].mode == "lines+markers"
87
+
88
89
90
+def test_lines_markers_legend_plot():
91
+ x = [0, 1]
92
+ y = [0, 1]
93
+ label = "label"
94
+ plt.figure()
95
+ plt.plot(x, y, "o-", label=label)
96
+ plt.legend()
97
98
+ plotly_fig = tls.mpl_to_plotly(plt.gcf())
99
100
+ assert plotly_fig.data[0].mode == "lines+markers"
101
+ assert plotly_fig.data[0].x == tuple(x)
102
+ assert plotly_fig.data[0].y == tuple(y)
103
+ assert plotly_fig.data[0].name == "label"
0 commit comments