File: example3.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 (30 lines) | stat: -rwxr-xr-x 532 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
29
30
#!/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)

p = biggles.FramedPlot()
p.title = "Title"
p.xlabel = "X axis"
p.ylabel = "Y axis"

p.add( biggles.Histogram(y) )
p.add( biggles.PlotLabel(.5, .5, "Histogram", color=0xcc0000) )

t1 = biggles.Table( 1, 2 )
t1[0,0] = p
t1[0,1] = p

t2 = biggles.Table( 2, 1 )
t2[0,0] = t1
t2[1,0] = p

#t2.write_img( 400, 400, "example3.png" )
#t2.write_eps( "example3.eps" )
t2.show()