I am attempting to generate some graphics prior to display on a
webpage. I have GhostScript 8.x loaded. And I can from the code below
generate the desired graphic. (it's right out of the /demos, pietest.py
with some mods) Works great. However were I to paste this into the main
flow of my program it fails to gen the graph. Simply no output. I do
not produce any errors at run time. I am assuming that I have some
pathing wrong.

Running on a WinXP box:

Main program is at               : c:\Comp\
Spot for graphic land is at     : c:\Comp\graphic\
pyChart is located at            : C:\Python24\pyChart\
pyChart libraries located at    : C:\Python24\Lib\site-packages\pychart
GhostScript located at          : C:\gs\gs8.14\bin

PYTHONPATH  :
c:\Python24;c:\Python24\Kari;c:\Python24\pyChart;C:\Python24\Lib\site-packages\pychart;c:\Comp

PATH        :
c:\WINDOWS\system32;c:\WINDOWS\;%SystemRoot%\System32\Wbem;C:\Program
Files\OpenSSH\bin;c:\PHP;C:\Program Files\ATI Technologies\ATI Control
Panel;c:\python24;C:\Python24\pyChart;C:\Python24\Lib\site-packages\pychart;C:\OpenSSH\bin;C:\Comp;C:\gs\gs8.14\bin

Anyone see anything that I missed?


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()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to