File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3275,5 +3275,25 @@ function testPColorHeatmapData(tc)
32753275 tc .verifyFalse(p.data{1 }.showscale);
32763276 try close(); catch ; end
32773277 end
3278+
3279+ function testRoseBarpolarData(tc )
3280+ % rose petals must convert to barpolar bars (one bar per
3281+ % petal) instead of a polar line loop, so each petal hovers
3282+ % as one unit.
3283+ fig = figure(" Visible" ," off" );
3284+ angles = deg2rad(0 : 30 : 330 );
3285+ rose(angles );
3286+
3287+ p = plotlyfig(fig ," visible" ," off" );
3288+
3289+ tc .verifyNumElements(p .data, 1 );
3290+ tc .verifyEqual(p.data{1 }.type, " barpolar" );
3291+ tc .verifyEqual(p.data{1 }.marker.color, PlotlyTestCase .AnyColorString());
3292+ tc .verifyEqual(p.data{1 }.marker.line.color, PlotlyTestCase .AnyColorString());
3293+ tc .verifyGreaterThanOrEqual(p.data{1 }.marker.line.width, 1 );
3294+ tc .verifyEqual(numel(p.data{1 }.theta), numel(p.data{1 }.r));
3295+ tc .verifyEqual(sum(p.data{1 }.r), numel(angles ));
3296+ try close(); catch ; end
3297+ end
32783298 end
32793299end
You can’t perform that action at this time.
0 commit comments