We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf29422 commit 7f5b5edCopy full SHA for 7f5b5ed
plotly/matplotlylib/tests/test_renderer.py
@@ -84,3 +84,19 @@ 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
+def test_lines_markers_legend_plot():
90
+ x = [0, 1]
91
+ y = [0, 1]
92
+ label = "label"
93
+ plt.figure()
94
+ plt.plot(x, y, "o-", label=label)
95
+ plt.legend()
96
97
+ plotly_fig = tls.mpl_to_plotly(plt.gcf())
98
99
+ assert plotly_fig.data[0].mode == "lines+markers"
100
+ assert plotly_fig.data[0].x == tuple(x)
101
+ assert plotly_fig.data[0].y == tuple(y)
102
+ assert plotly_fig.data[0].name == "label"
0 commit comments