[Matplotlib-users] Where is the widgets ...???
Hi all ..., Anyone may tell me what happend with the /widgets/ in the matplotlib??? Before it is here ..., from matplotlib import widgets but now it is vanished ..., or where it is ??? Further informations ... my matplotlib version is 1.0.0 - $Revision: 8503 $ my numpy version is 1.5.0.dev8469 my OS is Windows Vista 64 Thank you very much for any help. Cheers, -- Ademir Francisco da Silva -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Where is the widgets ...???
Em 11/07/2010 12:22, Ademir Francisco da Silva escreveu: Hi all ..., Anyone may tell me what happend with the /widgets/ in the matplotlib??? Before it is here ..., from matplotlib import widgets but now it is vanished ..., or where it is ??? Further informations ... my matplotlib version is 1.0.0 - $Revision: 8503 $ my numpy version is 1.5.0.dev8469 my OS is Windows Vista 64 Thank you very much for any help. Cheers, -- Ademir Francisco da Silva Hello again ..., Case closed. Finally I find it..., but for my success I have taken off the # of the #interactive : False on the line #37 from this file matplotlib\\mpl-data\\matplotlibrc and everything works fine now. But I have another important question for all of you..., recently I have changed my Python's version from 2.6.5 to 2.7 and since I did it my widgets.Cursor and widgets.Button do not work, so anyone have a idea about this behavior to tell me, please ??? Further information ... My code is the same and before it works fine but now it just not works ..., just take a look in the excerpt of my code below ... widgets.Cursor( axe, useblit = True, color = self.cor[ 477 ][ 1 ], lw = 2 ) widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), self.textName[ 19 ], color = self.cor[ 403 ][ 1 ], hovercolor = self.cor[ 46 ][ 1 ] ).\ on_clicked( self.button_12Click ) How may I fix it, please ??? Cheers, -- Ademir Francisco da Silva -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Where is the widgets ...???
On Sun, Jul 11, 2010 at 11:15 AM, Ademir Francisco da Silva > Case closed. Finally I find it..., but for my success I have taken off the > # of the #interactive : False on the line #37 from this file > matplotlib\\mpl-data\\matplotlibrc and everything works fine now. I don't think this flag will affect whether or nor widgets is imported. Are you sure you haven't made some other changes? > But I have another important question for all of you..., recently I have > changed my Python's version from 2.6.5 to 2.7 and since I did it my > widgets.Cursor and widgets.Button do not work, so anyone have a idea about > this behavior to tell me, please ??? > > Further information ... > My code is the same and before it works fine but now it just not works ..., > just take a look in the excerpt of my code below ... > > widgets.Cursor( axe, useblit = True, color = self.cor[ 477 ][ 1 ], lw = 2 ) > widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), self.textName[ 19 ], > color = self.cor[ 403 ][ 1 ], hovercolor = self.cor[ > 46 ][ 1 ] ).\ > on_clicked( self.button_12Click ) > > How may I fix it, please ??? Did you compile matplotlib for python2.7 yourself -- we haven't released any binaries yet for that version. Can you paste a complete free-standing example that replicates the problem as wee as the output of your script on your system when you pass in the --verbose-helpful flag? JDH -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Problems with pygtk and matplotlib
On Fri, 9 Jul 2010 19:37:56 -0500 John Hunter wrote: > On Fri, Jul 9, 2010 at 3:10 PM, Preben Randhol > wrote: > > > I'm trying to plot several subplots. I have setup a scrollwidget and > > viewport and I pack a canvas into a vbox in the viewport. > > > > Problem is that when I scroll, either some of the subplots are > > missing, or I get an error when I try to zoom on a graph that > > argument is not a gdk.gtk.image (or something like that) but None. > > > > I thought this was fixed in 1.0, but it isn't > > > > Please advice! > > Does this example work for you? > > > http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_gtk3.html Yes it works and a bit cleanup of my imports helped in my program too. However if I add NavigateToolbar to the example above I get problems. mtoolbar = NavigationToolbar(canvas, win) then I get error when I try to zoom in a graph: /usr/lib/pymodules/python2.6/matplotlib/backends/backend_gtk.py:621: DeprecationWarning: Use the new widget gtk.Tooltip self.tooltips = gtk.Tooltips() /usr/lib/pymodules/python2.6/matplotlib/backends/backend_gtk.py:601: GtkWarning: gdk_drawable_copy_to_image: assertion `src_y >= 0' failed self._imageBack = axrect, drawable.get_image(*axrect) Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_gtk.py", line 606, in idle_draw drawable.draw_image(gc, imageBack, 0, 0, *lastrect) TypeError: Gdk.Drawable.draw_image() argument 2 must be gtk.gdk.Image, not None The graph zooms, but I don't see the rubberband. I got same error in 1.0: TypeError: Gdk.Drawable.draw_image() argument 2 must be gtk.gdk.Image, not None > It uses a ScrolledWindow. > > Also, are you using backend_gtk or backend_gtkagg (and does it matter > for your problem?) I use GTKAgg and it works. GTK doesn't. > > If you could create a minimal example starting with > embedding_in_gtk3.py that replicates your problem, we're more likely > to be able to help. I have added the example above with my changes. Zooming is the problem. #!/usr/bin/env python """ demonstrate adding a FigureCanvasGTK/GTKAgg widget to a gtk.ScrolledWindow """ import gtk from matplotlib.figure import Figure from numpy import arange, sin, pi # uncomment to select /GTK/GTKAgg/GTKCairo #from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas #from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as FigureCanvas from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar win = gtk.Window() win.connect("destroy", lambda x: gtk.main_quit()) win.set_default_size(400,300) win.set_title("Embedding in GTK") f = Figure(figsize=(5,4), dpi=100) a = f.add_subplot(511) t = arange(0.0,3.0,0.01) s = sin(2*pi*t) a.plot(t,s) a = f.add_subplot(512) t = arange(0.0,3.0,0.01) s = sin(2*pi*t) a.plot(t,s) a = f.add_subplot(513) t = arange(0.0,3.0,0.01) s = sin(2*pi*t) a.plot(t,s) a = f.add_subplot(514) t = arange(0.0,3.0,0.01) s = sin(2*pi*t) a.plot(t,s) a = f.add_subplot(515) t = arange(0.0,3.0,0.01) s = sin(2*pi*t) a.plot(t,s) sw = gtk.ScrolledWindow() cx=gtk.VBox() win.add (cx) cx.pack_start(sw) # A scrolled window border goes outside the scrollbars and viewport sw.set_border_width (10) # policy: ALWAYS, AUTOMATIC, NEVER sw.set_policy (hscrollbar_policy=gtk.POLICY_NEVER, vscrollbar_policy=gtk.POLICY_ALWAYS) canvas = FigureCanvas(f) # a gtk.DrawingArea canvas.set_size_request(800,3000) bx=gtk.VBox() mtoolbar = NavigationToolbar(canvas, win) cx.pack_start(mtoolbar,False,False) sw.add_with_viewport (bx) bx.pack_start(canvas,True, True) win.show_all() gtk.main() -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Where is the widgets ...???
Em 11/07/2010 13:56, John Hunter escreveu: On Sun, Jul 11, 2010 at 11:15 AM, Ademir Francisco da Silva Case closed. Finally I find it..., but for my success I have taken off the # of the #interactive : False on the line #37 from this file matplotlib\\mpl-data\\matplotlibrc and everything works fine now. I don't think this flag will affect whether or nor widgets is imported. Are you sure you haven't made some other changes? But I have another important question for all of you..., recently I have changed my Python's version from 2.6.5 to 2.7 and since I did it my widgets.Cursor and widgets.Button do not work, so anyone have a idea about this behavior to tell me, please ??? Further information ... My code is the same and before it works fine but now it just not works ..., just take a look in the excerpt of my code below ... widgets.Cursor( axe, useblit = True, color = self.cor[ 477 ][ 1 ], lw = 2 ) widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), self.textName[ 19 ], color = self.cor[ 403 ][ 1 ], hovercolor = self.cor[ 46 ][ 1 ] ).\ on_clicked( self.button_12Click ) How may I fix it, please ??? Did you compile matplotlib for python2.7 yourself -- we haven't released any binaries yet for that version. Can you paste a complete free-standing example that replicates the problem as wee as the output of your script on your system when you pass in the --verbose-helpful flag? JDH Hi John ..., I am just take that binarie from this internet address http://www.lfd.uci.edu/~gohlke/pythonlibs/ H..., so I was wondering that the problem is it and I will have to wait for the official version of the matplotlib binaries for the Python 2.7( win64 ). Sucks...! I hope to have that binaries asap and after the installation of it I will verify if that problem continues. anyway I really enjoyed your prompt aid ..., Thanks. Cheers, -- Ademir Francisco da Silva -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Where is the widgets ...???
Again, please post a complete free-standing example that replicates the problem, otherwise we can not help you. The binaries you are using are as close to any later official binaries as possible at this point and they pass all the example tests for the agg, cairo, and pdf backends. Christoph On 7/11/2010 12:12 PM, Ademir Francisco da Silva wrote: >Em 11/07/2010 13:56, John Hunter escreveu: >> On Sun, Jul 11, 2010 at 11:15 AM, Ademir Francisco da Silva >>> Case closed. Finally I find it..., but for my success I have taken off the >>> # of the #interactive : False on the line #37 from this file >>> matplotlib\\mpl-data\\matplotlibrc and everything works fine now. >> I don't think this flag will affect whether or nor widgets is >> imported. Are you sure you haven't made some other changes? >> >>> But I have another important question for all of you..., recently I have >>> changed my Python's version from 2.6.5 to 2.7 and since I did it my >>> widgets.Cursor and widgets.Button do not work, so anyone have a idea about >>> this behavior to tell me, please ??? >>> >>> Further information ... >>> My code is the same and before it works fine but now it just not works ..., >>> just take a look in the excerpt of my code below ... >>> >>> widgets.Cursor( axe, useblit = True, color = self.cor[ 477 ][ 1 ], lw = 2 ) >>> widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), self.textName[ 19 ], >>> color = self.cor[ 403 ][ 1 ], hovercolor = >>> self.cor[ >>> 46 ][ 1 ] ).\ >>> on_clicked( self.button_12Click ) >>> >>> How may I fix it, please ??? >> Did you compile matplotlib for python2.7 yourself -- we haven't >> released any binaries yet for that version. Can you paste a complete >> free-standing example that replicates the problem as wee as the output >> of your script on your system when you pass in the --verbose-helpful >> flag? >> >> JDH >> >> > Hi John ..., > > I am just take that binarie from this internet address > http://www.lfd.uci.edu/~gohlke/pythonlibs/ > H..., so I was wondering that the problem is it and I will have to > wait for the official version of the matplotlib binaries for the Python > 2.7( win64 ). Sucks...! > I hope to have that binaries asap and after the installation of it I > will verify if that problem continues. > > anyway I really enjoyed your prompt aid ..., Thanks. > > > Cheers, > > > -- > Ademir Francisco da Silva > > > > -- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > > > > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Problems with pygtk and matplotlib
On 07/11/2010 07:52 AM, Preben Randhol wrote: >> >> Also, are you using backend_gtk or backend_gtkagg (and does it matter >> for your problem?) > > I use GTKAgg and it works. GTK doesn't. > backend_gtk has limitations that backend_gtkagg does not, although I don't know that your zooming problem should be one of them. Are you sure you *need* to use backend_gtk instead of backend_gtkagg? Eric -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] No color scaling when using plot_surface. Please help
On Friday, July 9, 2010, Benjamin Root wrote: > Jeremy, > > I believe that 0.99.1 is fairly old. I don't know when Axes3D came along, > but I am sure you can find it in 0.99.3. It is most definitely in 1.0, but > you might not need to go that far if your distro does not provide it. Wince my first post, I have upgraded to 1.0 which definitely has Axes3D. The trouble is that the plot_surface function does not deal with masked arrays like color does. That is what I need and I haven't found a way around it. Jeremy -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Redisplay a figure after it was closed
Hello everybody, My question is in the title ! Say that I have the following code: f = pylab.figure() f.plot([1,2,3,4,5]) pylab.show() and that, once I destroyed the figure by clicking on the top-right corner red button, I would like to redisplay it in the state it was just before I closed it. Is there way to do this ? There might be one as the variable f is still assigned as a figure object with all its attributes and methods still available. Thank you very much Eric -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users