X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b881fc787d2823bdd8a415080b82feee90804a17..9d6685e21c32c9a7ae18c5e3a4b39b5466614e46:/wxPython/demo/PyPlot.py diff --git a/wxPython/demo/PyPlot.py b/wxPython/demo/PyPlot.py new file mode 100644 index 0000000000..3f004249d8 --- /dev/null +++ b/wxPython/demo/PyPlot.py @@ -0,0 +1,114 @@ +# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net) +# +# o New demo +# + +import wx +import wx.lib.plot + +################################################################\ +# Where's the code??? | +# | +# wx.lib.plot.py came with its own excellent demo built in, | +# for testing purposes, but it serves quite well to demonstrate | +# the code and classes within, so we are simply borrowing that | +# code for the demo. Please load up wx.py.plot.py for a review | +# of the code itself. The demo/test is at the bottom of | +# the file, as expected. | +################################################################/ + +#---------------------------------------------------------------------- + +def runTest(frame, nb, log): + # Loading the demo class directly from the library's + # test code. + win = wx.lib.plot.TestFrame(nb, -1, "PlotCanvas Demo") + frame.otherWin = win + return None + +#---------------------------------------------------------------------- + +overview = """\ + +

PyPlot

+ +This demo illustrates the features of the new PyPlot modules, found +in wx.lib.plot.py. All methods and functions are documented clearly +therein; only the overview is included here. + +

+PyPlot is an improvement over wxPlotCanvas, which is now deprecated. +If you are using wxPlotCanvas now, please make plans to migrate in +anticipation of the time that wxPlotCanvas disappears completely. + +

+The demo illustrates four different plot styles (with appropriate +variations on fonts, etc, to show how flexible it is) as well as +provides you with a means to tinker with all the features that +come with the class itself. + +

+ +
+%s
+ +""" % wx.lib.plot.__doc__ + + +if __name__ == '__main__': + import sys,os + import run + run.main(['', os.path.basename(sys.argv[0])]) +