@@ -755,6 +755,46 @@ function testContourPlotData(tc)
755
755
), AbsTol= 1e- 16 );
756
756
end
757
757
758
+ function testFunctionContourPlotData(tc )
759
+ fig = figure(" Visible" ," off" );
760
+ fcontour(@(x ,y ) sin(3 * x ).*cos(x + y ),[0 3 0 3 ],Fill= " on" ,LineColor= " k" );
761
+ chartTitle = " f(x,y) = sin(3*x)*cos(x+y)" ;
762
+ title(chartTitle );
763
+ colormap(" spring" );
764
+
765
+ p = plotlyfig(fig ," visible" ," off" );
766
+
767
+ tc .verifyNumElements(p .data , 1 );
768
+ tc .verifyEqual(rmfield(p.data{1 }, [" colorscale" " x" " y" " z" ]), struct( ...
769
+ " xaxis" , " x1" , ...
770
+ " yaxis" , " y1" , ...
771
+ " name" , ' {sin}({3} {x}) {cos}({x}+{y})' , ...
772
+ " type" , ' contour' , ...
773
+ " visible" , true , ...
774
+ " xtype" , ' array' , ...
775
+ " ytype" , ' array' , ...
776
+ " autocontour" , false , ...
777
+ " contours" , struct( ...
778
+ " start" , - 1 , ...
779
+ " end" , 0.8 , ...
780
+ " size" , 0.2 , ...
781
+ " coloring" , ' fill' ...
782
+ ), ...
783
+ " zauto" , false , ...
784
+ " zmin" , - 1 , ...
785
+ " zmax" , 0.8 , ...
786
+ " showscale" , false , ...
787
+ " reversescale" , false , ...
788
+ " line" , struct( ...
789
+ " width" , 0.5 , ...
790
+ " dash" , ' solid' , ...
791
+ " color" , " rgb(0,0,0)" , ...
792
+ " smoothing" , 0 ...
793
+ ), ...
794
+ " showlegend" , true ...
795
+ ), AbsTol= 1e-2 );
796
+ end
797
+
758
798
function testStemPlotData(tc )
759
799
fig = figure(" Visible" ," off" );
760
800
x = 1 : 10 ;
0 commit comments