From 870fa20c4cf1854c4df16b994d1f1e324cd57127 Mon Sep 17 00:00:00 2001 From: Roberto Moura Date: Sat, 21 Nov 2026 05:38:51 +0000 Subject: [PATCH] Test_plotlyfig: set explicit limits and ticks in testLinePlotLayout --- plotly/Test_plotlyfig.m | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/plotly/Test_plotlyfig.m b/plotly/Test_plotlyfig.m index 19a24aa2..e7dae038 100644 --- a/plotly/Test_plotlyfig.m +++ b/plotly/Test_plotlyfig.m @@ -56,6 +56,8 @@ function testLinePlotLayout(tc) y = [0.0301 0.4411 0.7007 0.7030 0.5102 0.6122 0.7464 0.8014 0.3367 0.5641]; x = 1:10; plot(x,y); + set(gca, "XLim", [1 10], "XTick", 1:10, ... + "YLim", [0 0.9], "YTick", [0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9]); p = plotlyfig(fig,"visible","off"); @@ -177,14 +179,6 @@ function testLinePlotLayout(tc) "borderpad", 3 ... )}} ... ); - if is_octave() - expected.xaxis1.tickvals = [0 2 4 6 8 10]; - expected.xaxis1.range = [0 10]; - expected.xaxis1.ticktext = {'0'; '2'; '4'; '6'; '8'; '10'}; - expected.yaxis1.tickvals = [0 0.2 0.4 0.6 0.8 1]; - expected.yaxis1.range = [0 1]; - expected.yaxis1.ticktext = {'0'; '0.2'; '0.4'; '0.6'; '0.8'; '1'}; - end tc.verifyEqualStructs(p.layout, expected, 'AbsTol', 1e-15); try close(); catch; end end