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%\Syste m32\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() 1 1926 jo***********@comcast.net 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michele Petrazzo |
last post by:
I'm using PyChart like a module for create charts into a little web
site, but when I try to create one, I have this error:
/var/www/html/lgt/draw.py:19, in draw:
can =...
|
by: news-east.earthlink.net |
last post by:
The scenario:
two tables
CustomerTable
---------------
CustomerID
OrderID
CustomerName
CustomerEmail
|
by: ByteSize |
last post by:
Dear All,
Please, this is not meant to be offensive - but it is a challenge !!!
I have posted on over a dozen so called 'vb.net' expert / blog sites - in the vain hope of finding a complete,...
|
by: ROSY |
last post by:
hello,
response if u ,on all level of questions:::
1.how a self deletable .exe file deleted on some future date & time
without
invoking the .exe itself?
2.if we want that any wildcard...
|
by: Suresh |
last post by:
Hi,
I am new to C and curious to know some basic questions about C.
Why C is good?
In what way its better than any other languages?
If it is no longer a choice of programming language...why...
| |
by: Peter |
last post by:
The more questions I ask, the more likely I'll ask the right one and someone
will answer it, right?
Here's the big picture on my project: I'm writing a program that will keep
track of, among...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |