@@ -21,7 +21,7 @@ function testLinePlotData(tc)
2121 " line" , struct( ...
2222 " color" , " rgb(0,114,189)" , ...
2323 " width" , 0.5 , ...
24- " dash" , ' solid' ...
24+ " dash" , " solid" ...
2525 ), ...
2626 " marker" , struct( ...
2727 " size" , 3.6 , ...
@@ -334,8 +334,37 @@ function testPolarPlotData(tc)
334334 " line" , struct( ...
335335 " color" , " rgb(0,114,189)" , ...
336336 " width" , 1 , ...
337- " dash" , ' solid' ...
337+ " dash" , " solid" ...
338+ ), ...
339+ " showlegend" , true ...
340+ ), AbsTol= 1e- 15 );
341+ end
342+
343+ function testComplexPolarPlotData(tc )
344+ fig = figure(" Visible" ," off" );
345+ Z = [2 + 3i 2 - 1 + 4i 3 - 4i 5 + 2i - 4 - 2i - 2 + 3i - 2 - 3i 3i - 2i ];
346+ polarplot(Z ,' *' )
347+
348+ p = plotlyfig(fig ," visible" ," off" );
349+
350+ tc .verifyNumElements(p .data , 1 );
351+ tc .verifyEqual(p.data{1 }, struct( ...
352+ " subplot" , ' polar2' , ...
353+ " type" , ' scatterpolar' , ...
354+ " visible" , true , ...
355+ " name" , ' ' , ...
356+ " r" , fig .Children .Children .RData , ...
357+ " theta" , rad2deg(fig .Children .Children .ThetaData ), ...
358+ " mode" , ' markers' , ...
359+ " marker" , struct( ...
360+ " size" , 3.6 , ...
361+ " symbol" , " asterisk-open" , ...
362+ " line" , struct( ...
363+ " width" , 0.5 ...
364+ ), ...
365+ " color" , " rgb(0,114,189)" ...
338366 ), ...
367+ " line" , struct(), ...
339368 " showlegend" , true ...
340369 ), AbsTol= 1e- 15 );
341370 end
@@ -412,7 +441,7 @@ function testEasyToUsePolarPlotData(tc)
412441 " line" , struct( ...
413442 " color" , " rgb(0,114,189)" , ...
414443 " width" , 0.75 , ...
415- " dash" , ' solid' ...
444+ " dash" , " solid" ...
416445 ), ...
417446 " marker" , struct( ...
418447 " size" , 3.6 , ...
@@ -457,7 +486,7 @@ function testLogLogPlot(tc)
457486 " line" , struct( ...
458487 " color" , " rgb(255,0,0)" , ...
459488 " width" , 0.5 , ...
460- " dash" , ' solid' ...
489+ " dash" , " solid" ...
461490 ), ...
462491 " visible" , true , ...
463492 " showlegend" , false ...
@@ -641,7 +670,7 @@ function testStairsPlotData(tc)
641670 " line" , struct( ...
642671 " color" , " rgb(255,0,0)" , ...
643672 " width" , 0.5 , ...
644- " dash" , ' solid' , ...
673+ " dash" , " solid" , ...
645674 " shape" , " hv" ...
646675 ), ...
647676 " marker" , struct( ...
@@ -963,7 +992,7 @@ function testStemPlotData(tc)
963992 " line" , struct( ...
964993 " color" , " rgb(0,114,189)" , ...
965994 " width" , 1 , ...
966- " dash" , ' solid' ...
995+ " dash" , " solid" ...
967996 ), ...
968997 " marker" , struct( ...
969998 " size" , 3.6 , ...
@@ -1104,7 +1133,7 @@ function testErrorbarData(tc)
11041133 " line" , struct( ...
11051134 " color" , " rgb(0,114,189)" , ...
11061135 " width" , 0.5 , ...
1107- " dash" , ' solid' ...
1136+ " dash" , " solid" ...
11081137 ), ...
11091138 " marker" , struct( ...
11101139 " size" , 3.6 , ...
@@ -1162,7 +1191,7 @@ function testDoubleYAxisLinePlotData(tc)
11621191 " line" , struct( ...
11631192 " color" , " rgb(0,114,189)" , ...
11641193 " width" , 0.5 , ...
1165- " dash" , ' solid' ...
1194+ " dash" , " solid" ...
11661195 ), ...
11671196 " marker" , struct( ...
11681197 " size" , 3.6 , ...
@@ -1185,7 +1214,7 @@ function testDoubleYAxisLinePlotData(tc)
11851214 " line" , struct( ...
11861215 " color" , " rgb(217,83,25)" , ...
11871216 " width" , 0.5 , ...
1188- " dash" , ' solid' ...
1217+ " dash" , " solid" ...
11891218 ), ...
11901219 " marker" , struct( ...
11911220 " size" , 3.6 , ...
@@ -1217,7 +1246,7 @@ function testVerticalConstantLinePlotData(tc)
12171246 " line" , struct( ...
12181247 " color" , " rgb(38,38,38)" , ...
12191248 " width" , 0.5 , ...
1220- " dash" , ' solid' ...
1249+ " dash" , " solid" ...
12211250 ), ...
12221251 " showlegend" , true ...
12231252 ), AbsTol= 1e- 15 );
@@ -1237,7 +1266,7 @@ function testVerticalConstantLineWithLabel(tc)
12371266 tc .verifyEqual(p.data{1 }.line, struct( ...
12381267 " color" , " rgb(255,0,0)" , ...
12391268 " width" , width , ...
1240- " dash" , ' dash' ...
1269+ " dash" , " dash" ...
12411270 ));
12421271 tc .verifyTrue(any(cellfun(@(ann ) contains(ann .text ,label ), p .layout .annotations )));
12431272 tc .verifyTrue(any(cellfun(@(ann ) ann .xanchor == alignment , p .layout .annotations )));
@@ -1267,7 +1296,7 @@ function testStackedPlotData(tc)
12671296 " line" , struct( ...
12681297 " color" , " rgb(0,114,189)" , ...
12691298 " width" , 0.5 , ...
1270- " dash" , ' solid' ...
1299+ " dash" , " solid" ...
12711300 ), ...
12721301 " showlegend" , false ...
12731302 ));
@@ -1283,7 +1312,7 @@ function testStackedPlotData(tc)
12831312 " line" , struct( ...
12841313 " color" , " rgb(0,114,189)" , ...
12851314 " width" , 0.5 , ...
1286- " dash" , ' solid' ...
1315+ " dash" , " solid" ...
12871316 ) ...
12881317 ));
12891318 tc .verifyEqual(p.data{3 }, struct( ...
@@ -1298,7 +1327,7 @@ function testStackedPlotData(tc)
12981327 " line" , struct( ...
12991328 " color" , " rgb(0,114,189)" , ...
13001329 " width" , 0.5 , ...
1301- " dash" , ' solid' ...
1330+ " dash" , " solid" ...
13021331 ) ...
13031332 ));
13041333 end
@@ -1402,7 +1431,7 @@ function testBoxPlotData(tc)
14021431 " line" , struct( ...
14031432 " color" , " rgb(255,0,0)" , ...
14041433 " width" , 0.5 , ...
1405- " dash" , ' solid' ...
1434+ " dash" , " solid" ...
14061435 ), ...
14071436 " showlegend" , false ...
14081437 ), AbsTol= 1e- 15 );
@@ -1425,7 +1454,7 @@ function testBoxPlotData(tc)
14251454 " line" , struct( ...
14261455 " color" , " rgb(0,0,255)" , ...
14271456 " width" , 0.5 , ...
1428- " dash" , ' solid' ...
1457+ " dash" , " solid" ...
14291458 ), ...
14301459 " showlegend" , false ...
14311460 ), AbsTol= 1e- 15 );
@@ -1448,7 +1477,7 @@ function testBoxPlotData(tc)
14481477 " line" , struct( ...
14491478 " color" , " rgb(0,0,0)" , ...
14501479 " width" , 0.5 , ...
1451- " dash" , ' solid' ...
1480+ " dash" , " solid" ...
14521481 ), ...
14531482 " showlegend" , false ...
14541483 ), AbsTol= 1e- 15 );
@@ -1471,7 +1500,7 @@ function testBoxPlotData(tc)
14711500 " line" , struct( ...
14721501 " color" , " rgb(0,0,0)" , ...
14731502 " width" , 0.5 , ...
1474- " dash" , ' solid' ...
1503+ " dash" , " solid" ...
14751504 ), ...
14761505 " showlegend" , false ...
14771506 ), AbsTol= 1e- 15 );
@@ -1494,7 +1523,7 @@ function testBoxPlotData(tc)
14941523 " line" , struct( ...
14951524 " color" , " rgb(0,0,0)" , ...
14961525 " width" , 0.5 , ...
1497- " dash" , ' dash' ...
1526+ " dash" , " dash" ...
14981527 ), ...
14991528 " showlegend" , false ...
15001529 ), AbsTol= 1e- 15 );
@@ -1517,7 +1546,7 @@ function testBoxPlotData(tc)
15171546 " line" , struct( ...
15181547 " color" , " rgb(0,0,0)" , ...
15191548 " width" , 0.5 , ...
1520- " dash" , ' dash' ...
1549+ " dash" , " dash" ...
15211550 ), ...
15221551 " showlegend" , false ...
15231552 ), AbsTol= 1e- 15 );
0 commit comments