File: example1.py

package info (click to toggle)
python-biggles 1.6.4-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 628 kB
  • ctags: 789
  • sloc: python: 3,728; ansic: 1,103; makefile: 85; pascal: 42
file content (24 lines) | stat: -rwxr-xr-x 475 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python

import sys
sys.path.insert(1,'..')

import biggles
import Numeric, math

x = Numeric.arange( 0, 3*math.pi, math.pi/30 )
c = Numeric.cos(x)
s = Numeric.sin(x)

p = biggles.FramedPlot()
p.title = "title"
p.xlabel = r"$x$"
p.ylabel = r"$\Theta$"

p.add( biggles.FillBetween(x, c, x, s) )
p.add( biggles.Curve(x, c, color="red") )
p.add( biggles.Curve(x, s, color="blue") )

#p.write_img( 400, 400, "example1.png" )
#p.write_eps( "example1.eps" )
p.show()