File tree 1 file changed +40
-0
lines changed
1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,46 @@ function testScatter3DPlotData(tc)
267
267
));
268
268
end
269
269
270
+ function testSurfacePlotData(tc )
271
+ fig = figure(" Visible" ," off" );
272
+ points = linspace(-2 , 2 , 40 );
273
+ [x , y ] = meshgrid(points , points );
274
+ z = 2 ./ exp((x - 0.5 ).^2 + y .^ 2 )-2 ./ exp((x + 0.5 ).^2 + y .^ 2 );
275
+ surf(x , y , z )
276
+
277
+ p = plotlyfig(fig ," visible" ," off" );
278
+
279
+ tc .verifyNumElements(p .data , 1 );
280
+ tc .verifyEqual(rmfield(p.data{1 }, [" colorscale" " surfacecolor" ]), struct( ...
281
+ " xaxis" , " x1" , ...
282
+ " yaxis" , " y1" , ...
283
+ " type" , ' surface' , ...
284
+ " x" , x , ...
285
+ " y" , y , ...
286
+ " z" , z , ...
287
+ " contours" , struct( ...
288
+ " x" , struct( ...
289
+ " start" , - 2 , ...
290
+ " end" , 2 , ...
291
+ " size" , 0.102564102564103 , ...
292
+ " show" , true , ...
293
+ " color" , ' black' ...
294
+ ), ...
295
+ " y" , struct( ...
296
+ " start" , - 2 , ...
297
+ " end" , 2 , ...
298
+ " size" , 0.102564102564103 , ...
299
+ " show" , true , ...
300
+ " color" , ' black' ...
301
+ ) ...
302
+ ), ...
303
+ " name" , ' ' , ...
304
+ " showscale" , false , ...
305
+ " visible" , true , ...
306
+ " showlegend" , true ...
307
+ ), AbsTol= 1e- 15 );
308
+ end
309
+
270
310
function testPolarPlotData(tc )
271
311
fig = figure(" Visible" ," off" );
272
312
t = 0 : 0.01 : 2 * pi ;
You can’t perform that action at this time.
0 commit comments