File: plotdemo0.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 (16 lines) | stat: -rwxr-xr-x 414 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from scitools.std import *

# plot two curves in the same plot:
x = seq(0, 15, 0.2)   # 0, 0.2, 0.4, ...., 15
y1 = sin(x)*x
y2 = sin(x)*sqrt(x)

plot(x, y1, 'b-', x, y2, 'ro', legend=('x*sin(x)', 'sqrt(x)*sin(x)'),
     title='Simple Plot Demo',
     axis=(0, 15, -25, 25), xlabel='X', ylabel='Y')

hardcopy('tmp1.ps')  # this one can be included in latex
hardcopy('tmp1.png') #this one can be included in HTML