File: example7.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 (31 lines) | stat: -rwxr-xr-x 502 bytes parent folder | download | duplicates (6)
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
31
#!/usr/bin/env python

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

import biggles
import string

err_msg = """
This example needs the following data file:

	http://biggles.sourceforge.net/data/continents
"""
		
try:
	m = biggles.read_rows( "continents" )
except IOError:
	print err_msg
	sys.exit(-1)

p = biggles.HammerAitoffPlot()
p.ribs_l = 2

for i in range(len(m)/2):
	l = m[2*i]
	b = m[2*i+1]
	p.add( biggles.Curve(l, b) )

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