File: example5.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 (28 lines) | stat: -rwxr-xr-x 585 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
25
26
27
28
#!/usr/bin/env python

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

import biggles
import math, Numeric 

x = Numeric.arange( 0, 3*math.pi, math.pi/10 )
y = Numeric.sin(x)

a = biggles.FramedArray( 2, 2, title='title' )
a.aspect_ratio = 0.75
a.xlabel = "x label"
a.ylabel = "y label"
a.uniform_limits = 1
a.cellspacing = 1.

a.add( biggles.LineY(0, type='dot') )

a[0,0].add( biggles.Curve(x, .25*y) )
a[0,1].add( biggles.Curve(x, .50*y) )
a[1,0].add( biggles.Curve(x, .75*y) )
a[1,1].add( biggles.Curve(x, y) )

#a.write_img( 400, 400, "example5.png" )
#a.write_eps( "example5.eps" )
a.show()