PyChart-1.39/ 0000755 0001750 0001750 00000000000 10352125056 014453 5 ustar santiago santiago 0000000 0000000 PyChart-1.39/doc/ 0000755 0001750 0001750 00000000000 10371713025 015220 5 ustar santiago santiago 0000000 0000000 PyChart-1.39/doc/pychart/ 0000755 0001750 0001750 00000000000 10352146643 016677 5 ustar santiago santiago 0000000 0000000 PyChart-1.39/doc/pychart/drawing-graph-canvas.html 0000644 0001750 0001750 00000016564 10352146644 023605 0 ustar santiago santiago 0000000 0000000
area.T.draw()
"
(see Section 6) is called for the first time, and no canvas is yet
created at that moment. You can thus use you own canvas by creating a
canvas before calling the first area.T.draw()
, like below:
You can also achieve the same effect by passing the canvas object to the
area.T.draw()
method explicitly:
You can also pass a file object (or file-like object, such as
StringIO
) to canvas.init. In this case, you need
to define the output format via the second argument.
fd = file("foo.pdf", "w") can = canvas.init(fd, "pdf") ... ar.draw(can)
Naturally, you can write to multiple files by passing multiple
canvas
objects to different area.T.draw()
. For example,
the below example draws the first chart to graph1.pdf and the next
chart to graph2.pdf.
../demos/twographs.py
from pychart import * can = canvas.init("graph1.pdf") data = chart_data.read_csv("lines.csv") ar = area.T(x_range = (0,100), y_range = (0,100), x_axis = axis.X(label="X", tic_interval=10), y_axis = axis.Y(label="Y", tic_interval=10)) eb = error_bar.error_bar2(tic_len=5, hline_style=line_style.gray50) ar.add_plot(line_plot.T(label="foo", data=data, error_bar=eb, y_error_minus_col=3), line_plot.T(label="bar", data=data, ycol=2, error_bar=eb, y_error_minus_col=3)) ar.draw(can) tb = text_box.T(loc=(40, 130), text="This is\nimportant!", line_style=None) tb.add_arrow((ar.x_pos(data[6][0]), ar.y_pos(data[6][1])), "cb") tb.draw(can) can = canvas.init("graph2.pdf") ar = area.T(loc=(200, 0), x_range=(0,100), y_range=(0,100), x_axis = axis.X(label="X", tic_interval=10), y_axis = axis.Y(label="Y", tic_interval=10)) ar.add_plot(line_plot.T(label="foo", data=data, data_label_format="/8{}%d"), line_plot.T(label="bar", data=data, ycol=2)) ar.draw(can) # Note: can.close() is called automatically for every open canvas.
PyChart-1.39/doc/pychart/creating-canvas.html 0000644 0001750 0001750 00000013132 10352146643 022632 0 ustar santiago santiago 0000000 0000000
A new canvas is created by calling the class static method
canvas.init
. It is closed by
calling the close()
method of the canvas object.
fname=None format=None) |
When fname is omitted or is None, the output is sent to standard output. When format is omitted, it is guessed from the fname's suffix; failing that, "ps" is selected.
) |
PyChart-1.39/doc/pychart/rangetest.png 0000644 0001750 0001750 00000011644 10352146636 021411 0 ustar santiago santiago 0000000 0000000 PNG IHDR ' u PLTE ? * *? * * * U U? U U U ? ? ? ? * * ?* * * ** **?*******U *U?*U*U*U* *?**** *?**** *?**** *?***U U ?U U U U* U*?U*U*U*UU UU?UUUUUUU U?UUUU U?UUUU U?UUUU U?UUU ? * *?***U U?UUU ? ? ? ? ? * *?***U U?UUU ? ? ? ? ? * *?***U U?UUU ?ժ ժ?ժժժ ? ? ? * *?***U U?UUU ? ? ? ? ? ***UUU pHYs ~ tEXtSoftware GNU Ghostscript 7.07" !IDATx] +~[nAZ\迯@xx@xx@xAB << << << <@QJS