]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/PyPlot.py
1 # 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
9 ################################################################\
10 # Where's the code??? |
12 # wx.lib.plot.py came with its own excellent demo built in, |
13 # for testing purposes, but it serves quite well to demonstrate |
14 # the code and classes within, so we are simply borrowing that |
15 # code for the demo. Please load up wx.py.plot.py for a review |
16 # of the code itself. The demo/test is at the bottom of |
17 # the file, as expected. |
18 ################################################################/
20 #----------------------------------------------------------------------
22 def runTest(frame
, nb
, log
):
23 # Loading the demo class directly from the library's
25 win
= wx
.lib
.plot
.TestFrame(nb
, -1, "PlotCanvas Demo")
29 #----------------------------------------------------------------------
33 <center><h2>PyPlot</h2></center>
35 This demo illustrates the features of the new PyPlot modules, found
36 in wx.lib.plot.py. All methods and functions are documented clearly
37 therein; only the overview is included here.
40 PyPlot is an improvement over wxPlotCanvas, which is now deprecated.
41 If you are using wxPlotCanvas now, please make plans to migrate in
42 anticipation of the time that wxPlotCanvas disappears completely.
45 The demo illustrates four different plot styles (with appropriate
46 variations on fonts, etc, to show how flexible it is) as well as
47 provides you with a means to tinker with all the features that
48 come with the class itself.
56 This allows you to set up how the plot will be printed. This
57 is built into the library itself.
61 As you might expect, this allows you to preview how the plot
62 will look when printed, in light of the page setup you may
67 Suprise! It prints the current plot to your printer! :-)
71 That's right, the library even provides you with the means
72 to export the plotted data out to a graphics file. Several
73 formats are allowed for, basically any image class that
82 Different data with different plot formats, including one empty
87 If Zoom is enabled, you can rubber-band select an area of the
88 plot to examine it in detail using the left mouse button. Right
89 mouse button zooms back out. This is automatically supported
90 by the library, all you have to do is turn it on.
94 Plots can have different styles of grids, and and these grids can
95 be turned on or off as needed.
99 Plot can have legends or not, the contents which are definable
107 """ % wx
.lib
.plot
.__doc
__
110 if __name__
== '__main__':
113 run
.main(['', os
.path
.basename(sys
.argv
[0])])