469,360 Members | 1,774 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,360 developers. It's quick & easy.

wxPython + pyPlot

Hellow!

I'm writing program with wxpython and pyplot.
I need to put a graph (example):

def _draw1Objects():
# 100 points sin function, plotted as green circles
data1 = 2.*Numeric.pi*Numeric.arange(200)/200.
data1.shape = (100, 2)
data1[:,1] = Numeric.sin(data1[:,0])
markers1 = PolyMarker(data1, legend='Green Markers',
colour='green', marker='circle',size=1)

# 50 points cos function, plotted as red line
data1 = 2.*Numeric.pi*Numeric.arange(100)/100.
data1.shape = (50,2)
data1[:,1] = Numeric.cos(data1[:,0])
lines = PolyLine(data1, legend= 'Red Line', colour='red')

# A few more points...
pi = Numeric.pi
markers2 = PolyMarker([(0., 0.), (pi/4., 1.), (pi/2, 0.),
(3.*pi/4., -1)], legend='Cross Legend', colour='blue',
marker='cross')

return PlotGraphics([markers1, lines, markers2],"Graph
Title", "X Axis", "Y Axis")
on the PlotConvas object

self.notebook1 = wx.Notebook(id=wxID_FRAME1NOTEBOOK1, name='notebook1',
parent=self, pos=wx.Point(8, 24), size=wx.Size(800, 360),
style=0)

self.Okno_PT = wx.Window(id=wxID_FRAME1Okno_PT, name='Okno_PT',
parent=self.notebook1, pos=wx.Point(0, 0),
size=wx.Size(798,328), style=0)

self.Wykres_PT = wx.lib.plot.PlotCanvas(id=wxID_FRAME1WYKRES_PT,
name=u'Wykres_PT', parent=self.Okno_PT, pos=wx.Point(0, 0),
size=wx.Size(510, 328), style=0)
and I don't now how to do that.

thanks for any help.
Robert
Oct 18 '05 #1
4 4578
Maebe, does anyone have some examples with wxPython and pyplot?

Thanks again,
Robert
Oct 18 '05 #2
I think wxWidget comes with a sample

Philippe

Robert wrote:
Maebe, does anyone have some examples with wxPython and pyplot?

Thanks again,
Robert


Oct 18 '05 #3
Philippe C. Martin wrote:
I think wxWidget comes with a sample

Philippe

Yes I use it, but there is not a sample with pyplot.

Robert
Oct 18 '05 #4
My mistake, I understood plot (as in "from wx.lib.plot import *" that comes
with wxwidgets and which does have a demo)

Sorry,

Philippe
Robert wrote:
Philippe C. Martin wrote:
I think wxWidget comes with a sample

Philippe

Yes I use it, but there is not a sample with pyplot.

Robert


Oct 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Logan | last post: by
7 posts views Thread by SeeBelow | last post: by
25 posts views Thread by BJörn Lindqvist | last post: by
1 post views Thread by timothy.williams | last post: by
1 post views Thread by James Stroud | last post: by
reply views Thread by Robin Dunn | last post: by
reply views Thread by Robin Dunn | last post: by
4 posts views Thread by stef | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.