Skip to content

Commit facba52

Browse files
Add testMarkerFaceAutoColor (assert marker color picked up from figure)
1 parent bd9d2ac commit facba52

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

plotly/Test_plotlyfig.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3358,5 +3358,18 @@ function testFigureBackgroundColors(tc)
33583358
tc.verifyEqual(p.layout.plot_bgcolor, "rgb(26,204,26)");
33593359
try close(); catch; end
33603360
end
3361+
3362+
function testMarkerFaceAutoColor(tc)
3363+
% a filled marker with auto face color must be filled with
3364+
% the line color converted to 0-255, not a hardcoded float
3365+
% rgba default.
3366+
fig = figure("Visible","off");
3367+
plot(1:5, 1:5, "-o", "Color", [0.2 0.6 0.3], "MarkerFaceColor", "auto");
3368+
3369+
p = plotlyfig(fig,"visible","off");
3370+
3371+
tc.verifyEqual(p.data{1}.marker.color, "rgb(51,153,77)");
3372+
try close(); catch; end
3373+
end
33613374
end
33623375
end

0 commit comments

Comments
 (0)