Re: Any pyChart experts lend a hand?
- From: Bryan <belred@xxxxxxxxx>
- Date: Mon, 17 Jul 2006 19:50:30 -0700
john.mcginnis@xxxxxxxxxxx wrote:
Code
----------------------------------------------------
from pychart import *
import sys
theme.get_options()
theme.use_color = True
theme.output_format="png"
theme.output_file="C:\Comp\graphic\pic1.png"
theme.reinitialize()
data = [("foo", 10),("bar", 20), ("baz", 30), ("ao", 40)]
ar = area.T(size=(300,300), legend=legend.T(),
x_grid_style = None, y_grid_style = None)
plot = pie_plot.T(data=data, arc_offsets=[0,10,0,10],
shadow = (2, -2, fill_style.gray50),
label_offset = 25,
arrow_style = arrow.a3)
ar.add_plot(plot)
ar.draw()
i've been playing with pychart for exactly 5 minutes just before i read your post, so i doubt that makes me an expert, but i did your code to work by changing your code to this:
from pychart import *
import sys
theme.get_options()
theme.use_color = True
can = canvas.init('pic1.png')
data = [("foo", 10),("bar", 20), ("baz", 30), ("ao", 40)]
ar = area.T(size=(300,300), legend=legend.T(),
x_grid_style = None, y_grid_style = None)
plot = pie_plot.T(data=data, arc_offsets=[0,10,0,10],
shadow = (2, -2, fill_style.gray50),
label_offset = 25,
arrow_style = arrow.a3)
ar.add_plot(plot)
ar.draw()
bryan
.
- References:
- Any pyChart experts lend a hand?
- From: john . mcginnis
- Any pyChart experts lend a hand?
- Prev by Date: Re: range() is not the best way to check range?
- Next by Date: Re: using capicom with python
- Previous by thread: Any pyChart experts lend a hand?
- Next by thread: Starting a GUI application out of an console application
- Index(es):