@@ -366,56 +366,32 @@ def check_expected_error(what, f):
366
366
# several plots directly onto one another
367
367
xx ,yy = np .meshgrid (np .linspace (- 5 ,5 ,100 ),
368
368
np .linspace (- 5 ,5 ,100 ))
369
- zz = np .sin (xx ) + yy * yy / 30.
370
-
369
+ zz0 = np .sin (xx ) + yy * yy / 8.
370
+ zz1 = np .sin (xx ) + yy * yy / 10.
371
+ zz2 = np .sin (xx ) + yy * yy / 12.
372
+
373
+ commonset = ( 'origin 0,0' ,
374
+ 'size 1,1' ,
375
+ 'view 60,20,1,1' ,
376
+ 'xrange [0:100]' ,
377
+ 'yrange [0:100]' ,
378
+ 'zrange [0:150]' ,
379
+ 'contour base' )
371
380
for hardcopy in (None , "stacked-contours.png" , "stacked-contours.gp" ,):
372
- gp .plot3d ( (zz ,
373
- dict (tuplesize = 3 ,
374
- _with = np .array (('lines nosurface' ,
375
- 'labels boxed nosurface' )),
376
- _set = ( 'origin 0,0' ,
377
- 'size 1,1' ,
378
- 'view 60,30,1,1' ,
379
- 'xrange [0:100]' ,
380
- 'yrange [0:100]' ,
381
- 'zrange [0:150]' ,
382
- 'contour base' ,
383
- 'xyplane at 10' )) ),
384
-
385
- (zz ,
386
- dict (tuplesize = 3 ,
387
- _with = np .array (('lines nosurface' ,
388
- 'labels boxed nosurface' )),
389
- _set = ( 'origin 0,0' ,
390
- 'size 1,1' ,
391
- 'view 60,30,1,1' ,
392
- 'xrange [0:100]' ,
393
- 'yrange [0:100]' ,
394
- 'zrange [0:150]' ,
395
- 'contour base' ,
396
- 'xyplane at 50' )) ),
397
-
398
- (zz ,
399
- dict (tuplesize = 3 ,
400
- _with = np .array (('lines nosurface' ,
401
- 'labels boxed nosurface' )),
402
- _set = ( 'origin 0,0' ,
403
- 'size 1,1' ,
404
- 'view 60,30,1,1' ,
405
- 'xrange [0:100]' ,
406
- 'yrange [0:100]' ,
407
- 'zrange [0:150]' ,
408
- 'contour base' ,
409
- 'xyplane at 150' )) ),
410
-
411
- wait = 1 ,
381
+
382
+ gp .plot3d ( (zz0 , dict (_set = commonset + ('xyplane at 10' ,))),
383
+ (zz1 , dict (_set = commonset + ('xyplane at 80' ,))),
384
+ (zz2 , dict (_set = commonset + ('xyplane at 150' ,))),
385
+
386
+ tuplesize = 3 ,
387
+ _with = np .array (('lines nosurface' ,
388
+ 'labels boxed nosurface' )),
412
389
square = 1 ,
390
+ wait = True
413
391
hardcopy = hardcopy ,
414
392
multiplot = True )
415
393
416
394
417
-
418
-
419
395
################################
420
396
# testing some error detection
421
397
################################
0 commit comments