Skip to content

Commit f679fff

Browse files
committed
added basic multiplot samples to the demo
1 parent 0eec0df commit f679fff

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

demo.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,28 @@ def check_expected_error(what, f):
321321
################################
322322

323323
# basics
324+
gp.plot( th, nps.cat( np.cos(th), np.sin(th)),
325+
title = 'broadcasting sin, cos',
326+
_xrange = [0,2.*np.pi],
327+
_yrange = [-1,1],
328+
wait = 1)
329+
330+
gp.plot( (th, np.cos(th)),
331+
(th, np.sin(th)),
332+
title = 'separate plots for sin, cos',
333+
_xrange = [0,2.*np.pi],
334+
_yrange = [-1,1],
335+
wait = 1)
336+
337+
gp.plot( (th, np.cos(th), dict(title="cos",
338+
_xrange = [0,2.*np.pi],
339+
_yrange = [-1,1],)),
340+
(th, np.sin(th), dict(title="sin",
341+
_xrange = [0,2.*np.pi],
342+
_yrange = [-1,1])),
343+
multiplot='title "multiplot sin,cos" layout 2,1',
344+
wait = 1)
345+
324346
gp.plot( (x**2,),
325347
(-x, x**3),
326348
( rho,

0 commit comments

Comments
 (0)