Skip to content

Commit ed47534

Browse files
Add yticks test
1 parent ff371af commit ed47534

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

plotly/matplotlylib/tests/test_renderer.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,17 @@ def test_non_arithmetic_progression_xtickvals():
246246
assert plotly_fig.layout.xaxis.tickvals == tuple(xticks)
247247

248248

249+
def test_non_arithmetic_progression_yticks():
250+
yticks = [0.01, 0.53, 0.75]
251+
fig, ax = plt.subplots()
252+
ax.plot([0, 1], [0, 1])
253+
ax.set_yticks(yticks)
254+
255+
plotly_fig = tls.mpl_to_plotly(fig)
256+
257+
assert plotly_fig.layout.yaxis.tickvals == tuple(yticks)
258+
259+
249260
def test_non_arithmetic_progression_xticktext():
250261
xtickvals = [0.01, 0.53, 0.75]
251262
xticktext = ["Baseline", "param = 1", "param = 2"]

0 commit comments

Comments
 (0)