@@ -1557,6 +1557,37 @@ function testContour3PlotData(tc)
1557
1557
), AbsTol= 1e- 15 );
1558
1558
end
1559
1559
1560
+ function testFunctionSurfacePlotData(tc )
1561
+ fig = figure(" Visible" ," off" );
1562
+ fsurf(@(x ,y ) sin(x ).*cos(y ), [-pi pi - pi pi ]);
1563
+
1564
+ p = plotlyfig(fig ," visible" ," off" );
1565
+
1566
+ tc .verifyNumElements(p .data , 2 );
1567
+ tc .verifyEqual(rmfield(p.data{1 }, [" colorscale" " x" " y" " z" " surfacecolor" ]), struct( ...
1568
+ " scene" , ' scene1' , ...
1569
+ " type" , ' surface' , ...
1570
+ " opacity" , 1 , ...
1571
+ " name" , ' {sin}({x}) {cos}({y})' , ...
1572
+ " showscale" , false , ...
1573
+ " visible" , true , ...
1574
+ " showlegend" , true ...
1575
+ ));
1576
+ tc .verifyEqual(rmfield(p.data{2 }, [" x" " y" " z" ]), struct( ...
1577
+ " scene" , ' scene1' , ...
1578
+ " type" , ' scatter3d' , ...
1579
+ " mode" , ' lines' , ...
1580
+ " line" , struct( ...
1581
+ " color" , " rgb(0,0,0)" , ...
1582
+ " width" , 1.5 , ...
1583
+ " dash" , ' solid' ...
1584
+ ), ...
1585
+ " name" , ' {sin}({x}) {cos}({y})' , ...
1586
+ " showscale" , false , ...
1587
+ " visible" , true ...
1588
+ ));
1589
+ end
1590
+
1560
1591
function testTitleFont(tc )
1561
1592
fig = figure(" Visible" ," off" );
1562
1593
x = 1 : 10 ;
0 commit comments