File: test.py

package info (click to toggle)
pygdchart2 0.beta1-3.4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 524 kB
  • ctags: 311
  • sloc: python: 1,268; ansic: 1,029; makefile: 11; sh: 1
file content (24 lines) | stat: -rw-r--r-- 500 bytes parent folder | download | duplicates (5)
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 python2.2

import sys
import gdchart

g = gdchart.Line()
g.bg_color = "white" 
g.width = 600
g.height = 600
g.title = "Risk Event Trend Graph"
g.set_color = ["red", "blue"]
g.ytitle = "Risk"
g.xtitle = "Assessments"
g.setData((10, 20, 30), (30, 20, 10))
g.setLabels(("one", "two", "three"))
g.ticks = "NONE"
g.ylabel_density = 40 
#g.title_font_size = "GIANT"
g.title_font = "/home/aldo/.fonts/Elephnt.ttf"
g.title_ptsize = 12

print "Content-Type: image/png"
print
g.draw(sys.stdout)