Re: [Matplotlib-users] pylab (drag_pan )
To create a cursor that only pans horizontally, I'm thinking of writing a special version of drag_pan in backend_bases.py It would call drag_pan in axes.py with the key argument set to 'x' Any advice, suggestions? backend_bases.py : def my_drag_pan(self, event): 'the drag callback in pan/zoom mode' for a, ind in self._xypress: a.drag_pan(self._button_pressed, 'x', event.x, event.y) self.dynamic_update() # # In axes, up/down motion is prevented when the 'x' key is down # axes.py def drag_pan(self, button, key, x, y): ... elif key=='x': dy = 0 ... Marc Desmarais Long Beach, CA, 90814 --- On Wed, 8/12/09, Eric Firing efir...@hawaii.edu wrote: From: Eric Firing efir...@hawaii.edu Subject: Re: [Matplotlib-users] pylab To: marc desmarais mdesm2...@yahoo.com Cc: matplotlib-users matplotlib-users@lists.sourceforge.net Date: Wednesday, August 12, 2009, 9:59 AM marc desmarais wrote: I found a typo at http://matplotlib.sourceforge.net/users/navigation_toolbar.html; If you press ‘x’ or ‘y’ while panning the motion will be contrained to the x or y axis, respectively. Thank you. Now it is fixed. BTW, do you know how to constrain the panning function to left/right programmatically? I'm try to make a logic analyzer. I don't know offhand, but I don't think that capability is in place. I find holding down a key while panning to be a bit awkward, so I am also interested in alternatives. Finally, is this the best place to post my questions? (I suspect not...) Yes, matplotlib-users is the right place. I assume you intended to reply-to-all on that last one, so intended it to go to the list. Apparently the settings on this list are unusual in that one must explicitly reply-to-all; it is not automatic that one's reply goes to the list. Eric --- On *Mon, 8/10/09, Eric Firing /efir...@hawaii.edu/* wrote: From: Eric Firing efir...@hawaii.edu Subject: Re: [Matplotlib-users] pylab To: marc desmarais mdesm2...@yahoo.com Cc: matplotlib-users@lists.sourceforge.net Date: Monday, August 10, 2009, 7:22 PM marc desmarais wrote: Are there still two pylabs? Are the following two web pages referring to the same pylab? Not exactly: This one is a vision or proposal, open for discussion: http://www.scipy.org/PyLab This one is real: http://matplotlib.sourceforge.net/ The pylab interface to the matplotlib plotting library has some of the characteristics the author of the first link is talking about, but the trend has been away from some aspects of that vision, not towards it. For more about the real pylab, see http://matplotlib.sourceforge.net/faq/usage_faq.html#matplotlib-pylab-and-pyplot-how-are-they-related I'm a bit confused (trying to get the Scipy, Numpy, Pylab, Matplolib story straight, before I plunge in) Numpy is the common core, providing N-dimensional arrays and math; matplotlib is a plotting library, using numpy; scipy is a collection of math/science functionality, also using numpy. But don't forget ipython, which provides a nice interactive shell: http://ipython.scipy.org/moin/ Eric Marc Desmarais Long Beach, CA, 90814 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Interactive navigation toolbar documentation recommendation
I just realized that by clicking once on the pan button, the cursor goes into pan, and clicking again, it goes back to the arrow. Same for some of the other buttons. I realized this by looking at the code. I would recommend that the documentation at the link shown below say something about this. http://matplotlib.sourceforge.net/users/navigation_toolbar.html Marc Desmarais Long Beach, CA, 90814 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] what's a patch for?
what's a patch for? At this address: http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.Patch I found the following description of a patch A patch is a 2D thingy with a face color and an edge color. Could someone expand? Why use it? When to use it? What does it look like? thanks Marc Desmarais -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] can't picker once pan or zoom chosen
I created a simple scatter plot and a service routine to print out the coordinates of the points I pick with the cursor (based on the demo). It works until I select the pan or zoom cursor. After I zoom or pan, I can no longer get back to the normal cursor which allows me to pick a circle. Even clicking home doesn't help. The code is shown below from matplotlib import figure,pyplot from numpy import linspace,sin,take fig=pyplot.figure() ax1=fig.add_subplot(1,1,1) # (numRows, numCols, plotNum) t=linspace(0,10,100) y1=sin(5*t) y2=y1+sin(10*t) line1=ax1.scatter(y1,y2,picker=True) def onpick1(event): ind = event.ind print 'onpick1 scatter:', ind, take(y1, ind), take(y2, ind) fig.canvas.mpl_connect('pick_event', onpick1) pyplot.show() this is based on the demo at http://matplotlib.sourceforge.net/examples/event_handling/pick_event_demo.html?highlight=scatter Marc Desmarais 537 Park Av. Long Beach, CA, 90814 (562) 712 8682 cell -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] FYI, typo
This sentence is missing to or and I think: These helper methods will take your data (eg. numpy arrays and strings) create primitive ... Is in at http://matplotlib.sourceforge.net/users/artists.html Marc Desmarais Long Beach, CA -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] typo
The longitude and latitude lines can be labelled where they the map projection boundary at http://matplotlib.sourceforge.net/basemap/doc/html/users/graticule.html Marc Desmarais Long Beach, CA, 90814 --- On Wed, 8/19/09, marc desmarais mdesm2...@yahoo.com wrote: From: marc desmarais mdesm2...@yahoo.com Subject: embeding basemap in Tk To: matplotlib-users@lists.sourceforge.net Date: Wednesday, August 19, 2009, 9:33 PM How do I embed basemap in Tk? I tried following the matplotlib example. But the following does not work (the earth does not appear): import matplotlib matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg from matplotlib.figure import Figure from mpl_toolkits.basemap import Basemap import Tkinter as Tk root = Tk.Tk() root.wm_title(Embedding in TK) f = Figure()#figsize=(5,4), dpi=100) map = Basemap(projection='ortho', lat_0=34.0,lon_0=-117.3, resolution='l' area_thresh=1000.) map.drawcoastlines() map.drawcountries() map.fillcontinents(color='coral') map.drawmapboundary() canvas = FigureCanvasTkAgg(f, master=root) canvas.show() canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) toolbar = NavigationToolbar2TkAgg( canvas, root ) toolbar.update() canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) Tk.mainloop() thanks... Marc Desmarais Long Beach, CA, 90814 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] embeding basemap in Tk
I think I needed to create an axes. This seems to have solved my problem. a = f.add_subplot(111) map = Basemap(projection='ortho', lat_0=34.0, lon_0=-117.3, resolution='l', area_thresh=1000, ax=a) Marc Desmarais Long Beach, CA, 90814 --- On Wed, 8/19/09, marc desmarais mdesm2...@yahoo.com wrote: From: marc desmarais mdesm2...@yahoo.com Subject: embeding basemap in Tk To: matplotlib-users@lists.sourceforge.net Date: Wednesday, August 19, 2009, 9:33 PM How do I embed basemap in Tk? I tried following the matplotlib example. But the following does not work (the earth does not appear): import matplotlib matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg from matplotlib.figure import Figure from mpl_toolkits.basemap import Basemap import Tkinter as Tk root = Tk.Tk() root.wm_title(Embedding in TK) f = Figure()#figsize=(5,4), dpi=100) map = Basemap(projection='ortho', lat_0=34.0,lon_0=-117.3, resolution='l' area_thresh=1000.) map.drawcoastlines() map.drawcountries() map.fillcontinents(color='coral') map.drawmapboundary() canvas = FigureCanvasTkAgg(f, master=root) canvas.show() canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) toolbar = NavigationToolbar2TkAgg( canvas, root ) toolbar.update() canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) Tk.mainloop() thanks... Marc Desmarais Long Beach, CA, 90814 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] embeding basemap in Tk
How do I embed basemap in Tk? I tried following the matplotlib example. But the following does not work (the earth does not appear): import matplotlib matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg from matplotlib.figure import Figure from mpl_toolkits.basemap import Basemap import Tkinter as Tk root = Tk.Tk() root.wm_title(Embedding in TK) f = Figure()#figsize=(5,4), dpi=100) map = Basemap(projection='ortho', lat_0=34.0,lon_0=-117.3, resolution='l' area_thresh=1000.) map.drawcoastlines() map.drawcountries() map.fillcontinents(color='coral') map.drawmapboundary() canvas = FigureCanvasTkAgg(f, master=root) canvas.show() canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) toolbar = NavigationToolbar2TkAgg( canvas, root ) toolbar.update() canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) Tk.mainloop() thanks... Marc Desmarais Long Beach, CA, 90814 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] basemap 0.99.4 on vista no go 0xC0000005: Access Violation?
I can run a demo basemap on my Vista PC using version 0.99.3 for py2.5. I upgraded to 0.99.4 because the great circle function would crash. But now nothing works. I brought it in to Microsoft C++ debugger: unhandled exception in python.exe: 0xC005: Access Violation Marc Desmarais Long Beach, CA, 90814 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] pylab
Are there still two pylabs? Are the following two web pages referring to the same pylab? http://www.scipy.org/PyLab http://matplotlib.sourceforge.net/ I'm a bit confused (trying to get the Scipy, Numpy, Pylab, Matplolib story straight, before I plunge in) Marc Desmarais Long Beach, CA, 90814 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users