File: plotdemo2.py

package info (click to toggle)
scitools 0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 17,252 kB
  • ctags: 2,871
  • sloc: python: 28,744; sh: 112; makefile: 15
file content (17 lines) | stat: -rwxr-xr-x 357 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from scitools.std import *

x = seq(0, 15, 0.2)
y = sin(x)*x

# plot in batch (i.e., no plot on the screen, only make hardcopy):
plot(x, y, 'b-', legend='y', title='plot demo 2 (in batch)',
     show=False)
hardcopy('tmp1.ps')

# or
axis(ymin=-20,ymax=20)
plot(x, y, 'b-', legend='y', title='plot demo 2 (in batch)',
     show=False, hardcopy='tmp2.ps')