[Matplotlib-users] Forcing draw_if_interactive() to bring up new window...
I have functions which plot multiple items to an axis. Often, I have the function explicitly turn interactive mode off and then I turn it back on to what it was before my function was called. At the end of my function, I call draw_if_interactive(). Suppose the user had interactive mode on prior to the function call. The problem I am having is that draw_if_interactive() seems to have no effect---no figure is drawn unless the user makes a subsequent call to show(). Is there a way around this? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to reverse the direction of an axis?
Daehyok Shin wrote: > Thanks for your help. > I didn't know set_ylim can the reversed limits. I am wondering if it > is not a good idea to introduce a method such as axis.set_direction(). > Or, axis.set_origin(). > There are Axes methods invert_xaxis() and invert_yaxis() in recent versions of mpl; I don't remember who added them or when. Eric - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to reverse the direction of an axis?
Thanks for your help. I didn't know set_ylim can the reversed limits. I am wondering if it is not a good idea to introduce a method such as axis.set_direction(). Or, axis.set_origin(). Daehyok Shin On Jan 29, 2008 5:16 PM, Eric Firing <[EMAIL PROTECTED]> wrote: > In [1]:plot(arange(10)) > Out[1]:[] > > In [2]:ax = gca() > > In [3]:ax.set_ylim(ax.get_ylim()[::-1]) > Out[3]:(9.0, 0.0) > > In [4]:draw() > > In [5]: > > > The method in line 3 should work on new and old versions of matplotlib. > The basic idea is that when axis limits are set, you specify the bottom, > then the top (or the right, then the left), not min and then max. > > Eric > > > Daehyok Shin wrote: > > I like to reverse the direction of y axis - from top to bottom. > > Anyone to help me? > > I initially thought it may be easy, but it turned out much harder to > > find THE SOLUTION. > > Thanks. > > > > Daehyok Shin > > > > - > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > > ___ > > Matplotlib-users mailing list > > Matplotlib-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Daehyok Shin, PhD Geography Department University of North Carolina-Chapel Hill USA - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib, ipython and ubuntu
On Jan 29, 2008 4:13 PM, Tim Michelsen <[EMAIL PROTECTED]> wrote: > In [1]: import timeseries as TS > > In [2]: whos > --- > Traceback (most recent call last) > > /var/tmp/install/qgislite_trunk/ in () > > /var/lib/python-support/python2.5/IPython/iplib.py in ipmagic(self, arg_s) > 962 else: > 963 magic_args = self.var_expand(magic_args,1) > --> 964 return fn(magic_args) > 965 > 966 def ipalias(self,arg_s): > > /var/lib/python-support/python2.5/IPython/Magic.py in magic_whos(self, > parameter_s) > 989 array_type = None > 990 else: > --> 991 array_type = Numeric.ArrayType.__name__ > 992 > 993 # Find all variable names and types so we can figure > out column sizes > > : 'module' object has no attribute > 'ArrayType' > > maybe some of the IPython power users can give me a hint why this > happes. [1] Very strange. I can't reproduce it here (on gutsy, but running ipython from my own tree). What's odd is this: In [1]: import Numeric In [2]: print Numeric.ArrayType So Numeric *most definitely* has an ArrayType member. Try doing the same as I did, also showing us whether you started ipython with -pylab or not. There may be something odd about your Numeric installation. Also do this: In [3]: Numeric? Type: module Base Class: Namespace: Interactive File: /usr/lib/python2.5/site-packages/Numeric/Numeric.py [etc] It's possible that you have in your path a file called Numeric.py which is not the 'real' Numeric module. This would explain your problem and why nobody else sees it. Cheers, f - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib, ipython and ubuntu
Hello! > Hmm, I did reinstall and still no joy, it insists on install python2.4 > at the same time! do a $: sudo apt-get --purge remove matplotlib ipython to really remove the configuration files. then $: sudo apt-get install matplotlib ipython check if pylab is on your system: $: locate pylab Here are the contents of pylab: from matplotlib.pylab import * so you may just test this in a python shell: $ python Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from matplotlib.pylab import * >>> then do the same from within ipython as I'd shown in my previous mail. I hope that this helps you to narrow it down. I have also some troubles with ipython that is currently in Gutsy: ipython Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) Type "copyright", "credits" or "license" for more information. IPython 0.8.1 -- An enhanced Interactive Python. ? -> Introduction to IPython's features. %magic -> Information about IPython's 'magic' % functions. help-> Python's own help system. object? -> Details about 'object'. ?object also works, ?? prints more. In [1]: import timeseries as TS In [2]: whos --- Traceback (most recent call last) /var/tmp/install/qgislite_trunk/ in () /var/lib/python-support/python2.5/IPython/iplib.py in ipmagic(self, arg_s) 962 else: 963 magic_args = self.var_expand(magic_args,1) --> 964 return fn(magic_args) 965 966 def ipalias(self,arg_s): /var/lib/python-support/python2.5/IPython/Magic.py in magic_whos(self, parameter_s) 989 array_type = None 990 else: --> 991 array_type = Numeric.ArrayType.__name__ 992 993 # Find all variable names and types so we can figure out column sizes : 'module' object has no attribute 'ArrayType' maybe some of the IPython power users can give me a hint why this happes. [1] I have already filed a bug report to Ubuntu but are not able to explain more: magic function whos not working in ipython https://bugs.launchpad.net/ubuntu/+source/ipython/+bug/177253 Kind regards, Timmie [1] Thats Why I crosspost to ipython-user. Inital post was: http://permalink.gmane.org/gmane.comp.python.matplotlib.general/11463 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to reverse the direction of an axis?
In [1]:plot(arange(10)) Out[1]:[] In [2]:ax = gca() In [3]:ax.set_ylim(ax.get_ylim()[::-1]) Out[3]:(9.0, 0.0) In [4]:draw() In [5]: The method in line 3 should work on new and old versions of matplotlib. The basic idea is that when axis limits are set, you specify the bottom, then the top (or the right, then the left), not min and then max. Eric Daehyok Shin wrote: > I like to reverse the direction of y axis - from top to bottom. > Anyone to help me? > I initially thought it may be easy, but it turned out much harder to > find THE SOLUTION. > Thanks. > > Daehyok Shin > > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] How to reverse the direction of an axis?
I like to reverse the direction of y axis - from top to bottom. Anyone to help me? I initially thought it may be easy, but it turned out much harder to find THE SOLUTION. Thanks. Daehyok Shin - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting a series of 3D points and, picker=True and 3D
The axes3d stuff is not currently working on the SVN trunk. You probably want to use 0.91.2 or the v0_91_maint branch in SVN instead. Cheers, Mike Johann Cohen-Tanugi wrote: > hello, > thanks for answering. I actually fail with the import : > In [1]: from matplotlib import axes3d > --- > ImportError Traceback (most recent call last) > > /home/cohen/bstw/ in () > > /usr/lib/python2.5/site-packages/matplotlib/axes3d.py in () > 14 from axes import Axes > 15 import cbook > ---> 16 from transforms import unit_bbox > 17 > 18 import numpy as npy > > ImportError: cannot import name unit_bbox > > any idea? > >> -- >> >> Message: 1 >> Date: Sun, 27 Jan 2008 22:18:00 + >> From: "Neil Crighton" <[EMAIL PROTECTED]> >> Subject: Re: [Matplotlib-users] plotting a series of 3D points and >> picker=True and 3D >> To: matplotlib-users@lists.sourceforge.net >> Message-ID: >> <[EMAIL PROTECTED]> >> Content-Type: text/plain; charset=ISO-8859-1 >> >> I think scatter3D does what you want: >> >> from matplotlib import axes3d >> import pylab as pl >> fig = pl.figure() >> ax = axes3d.Axes3D(fig) >> ax.scatter3D(data[:,0],data[:,1],data[:,2]) >> ax.set_xlabel('X value') >> ax.set_ylabel('Y value') >> ax.set_zlabel('Z value') >> pl.show() >> >> You could also change the colour and size of each point based on other >> array values: >> >> col = ax.scatter3D(data[:,0], data[:,1], data[:,2], c=data[:,3], >> cmap=pl.cm.jet, s=data[:,4]) >> cbar = fig.colorbar(col,shrink=0.9,extend='both') >> cbar.ax.set_ylabel('axis 3 data values') >> >> Pretty nifty. >> >> Neil >> >> >> > > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting a series of 3D points and, picker=True and 3D
hello, thanks for answering. I actually fail with the import : In [1]: from matplotlib import axes3d --- ImportError Traceback (most recent call last) /home/cohen/bstw/ in () /usr/lib/python2.5/site-packages/matplotlib/axes3d.py in () 14 from axes import Axes 15 import cbook ---> 16 from transforms import unit_bbox 17 18 import numpy as npy ImportError: cannot import name unit_bbox any idea? > -- > > Message: 1 > Date: Sun, 27 Jan 2008 22:18:00 + > From: "Neil Crighton" <[EMAIL PROTECTED]> > Subject: Re: [Matplotlib-users] plotting a series of 3D points and > picker=True and 3D > To: matplotlib-users@lists.sourceforge.net > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1 > > I think scatter3D does what you want: > > from matplotlib import axes3d > import pylab as pl > fig = pl.figure() > ax = axes3d.Axes3D(fig) > ax.scatter3D(data[:,0],data[:,1],data[:,2]) > ax.set_xlabel('X value') > ax.set_ylabel('Y value') > ax.set_zlabel('Z value') > pl.show() > > You could also change the colour and size of each point based on other > array values: > > col = ax.scatter3D(data[:,0], data[:,1], data[:,2], c=data[:,3], > cmap=pl.cm.jet, s=data[:,4]) > cbar = fig.colorbar(col,shrink=0.9,extend='both') > cbar.ax.set_ylabel('axis 3 data values') > > Pretty nifty. > > Neil > > > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Mac OSX binary missing setup.py
You shouldn't ever find a setup.py file in a binary distribution. It is there for building purposes, hence should be with the source distributions. - Charlie On Tue, Jan 29, 2008 at 10:47 AM, Jeff Younker <[EMAIL PROTECTED]> wrote: > I'm running on OSX 10.5. > > The installation process for me was the following two commands: > $ easy_install matplotlib > $ easy_install numpy > > That's it. You don't need to manually download the egg. You don't > need to root around in the egg. Just run easy_install. It retrieves > the > egg and installs it in the correct location. > > - Jeff Younker - [EMAIL PROTECTED] - > > > > > On Jan 28, 2008, at 9:29 PM, Michael Barton wrote: > > > I wanted to test MatPlotLib for use in a GIS system for which I help > > develop the GUI in wxPython. I'm working on a Mac Intel OSX 10.4.11 > > system. > > > > The installation instructions for OS X are very sketchy and there is > > no readme in the binary. But AFAICT, there ought to be a setup.py > > file in the fat egg distribution folder. However, there is no such > > beast. There is only pylab.py and that isn't a distribution build > > utility. > > > > Since I'm not a member of the list, I'd appreciate it if someone > > could email me directly. > > > > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Positioning annotations
Hi, I would like to annotate a bunch of points on a map. I'm trying to use the annotate function, but it need to know the text coordinates. So you have to configure manually in order not to have these annotations overlap each other. This is really annoying. Is there a way to : - detect the "best" position for theses annotation as with loc="best" argument of the legend function ? - let me move theses annotations with the mouse ? I've heard that matplotlib gives the possibility of using events and signals. Can this be used in this situation ? Is there any example for this ? Regards, -- BL - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Highlight datapoint
On Jan 29, 2008 9:46 AM, Slackenerny <[EMAIL PROTECTED]> wrote: > Hey, > I'm currently plotting a dataset as x,y-scatter or a set of x values, > and I would like to know if there is a simple way to highlight a when I want to highlight a single point, I frequently use something like the following trick: x, y = np.random.rand(2, 30) plot(x, y, 'o', ms=6, mfc='blue') ind = 10 # highlight the 10th point plot([x[ind]], [y[ind]], 'o', ms=15, mfc='yellow', alpha=0.4) > Additional information: there is a second window with changing chemical > structures, and I would like to have the energy that is connected to > the structure shown at that very moment to be highlighted... You should be able to connect events in one window with line properties in the other to accomplish this -- let us know if you need any help with this. JDH - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Highlight datapoint
Hey, I'm currently plotting a dataset as x,y-scatter or a set of x values, and I would like to know if there is a simple way to highlight a single point? Additional information: there is a second window with changing chemical structures, and I would like to have the energy that is connected to the structure shown at that very moment to be highlighted... best wishes - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Mac OSX binary missing setup.py
I'm running on OSX 10.5. The installation process for me was the following two commands: $ easy_install matplotlib $ easy_install numpy That's it. You don't need to manually download the egg. You don't need to root around in the egg. Just run easy_install. It retrieves the egg and installs it in the correct location. - Jeff Younker - [EMAIL PROTECTED] - On Jan 28, 2008, at 9:29 PM, Michael Barton wrote: > I wanted to test MatPlotLib for use in a GIS system for which I help > develop the GUI in wxPython. I'm working on a Mac Intel OSX 10.4.11 > system. > > The installation instructions for OS X are very sketchy and there is > no readme in the binary. But AFAICT, there ought to be a setup.py > file in the fat egg distribution folder. However, there is no such > beast. There is only pylab.py and that isn't a distribution build > utility. > > Since I'm not a member of the list, I'd appreciate it if someone > could email me directly. > - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] atomic line.set_xdata and set_ydata
John Hunter wrote: > On Jan 29, 2008 8:33 AM, Robert Cimrman <[EMAIL PROTECTED]> wrote: >> Is there a way of simultaneously setting both xdata and ydata of a line? >> I need to animate a line with varying number of points in each frame. > > line.set_data(xdata, ydata) > > is what you are looking for Great! I did not see that one. r. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Mac OSX binary missing setup.py
I wanted to test MatPlotLib for use in a GIS system for which I help develop the GUI in wxPython. I'm working on a Mac Intel OSX 10.4.11 system. The installation instructions for OS X are very sketchy and there is no readme in the binary. But AFAICT, there ought to be a setup.py file in the fat egg distribution folder. However, there is no such beast. There is only pylab.py and that isn't a distribution build utility. Since I'm not a member of the list, I'd appreciate it if someone could email me directly. Thanks Michael Barton C. Michael Barton, Professor of Anthropology Director of Graduate Studies School of Human Evolution & Social Change Center for Social Dynamics & Complexity Arizona State University Phone: 480-965-6262 Fax: 480-965-7671 www: - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib, ipython and ubuntu
I just migrated from edgy to gutsy this weekend. I did a clean install (boy it really went smoothly - either I'm getting better or the installs are) and it all works fine for me. I used Adept Manager to install everything. You installed numpy? I'm running kubuntu. On Mon, 28 Jan 2008 17:39:45 + Andy Cheesman <[EMAIL PROTECTED]> wrote: > Hi people > > I'm trying to use matplotlib, ipython and xubuntu(gusty) all together. > Whenever I try to run ipython with -pylab tab, nothing extra happens to > the start up screen and pylab hasn't been imported. I have managed to > sucessfull install ipython and matplotlib on a Redhat system and ipython > -pylab works. ipython and matplotlib work btw > > I've tried install from source, apt and easy_install all to to avail > > Can anyone suggest what I am doing wrong or an output to post to show > more details of what is happening on my machine > > Thanks > > Andy > > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- --- | Alan K. Jackson| To see a World in a Grain of Sand | | [EMAIL PROTECTED] | And a Heaven in a Wild Flower, | | www.ajackson.org | Hold Infinity in the palm of your hand | | Houston, Texas | And Eternity in an hour. - Blake | --- - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] atomic line.set_xdata and set_ydata
On Jan 29, 2008 8:33 AM, Robert Cimrman <[EMAIL PROTECTED]> wrote: > > Is there a way of simultaneously setting both xdata and ydata of a line? > I need to animate a line with varying number of points in each frame. line.set_data(xdata, ydata) is what you are looking for JDH - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] atomic line.set_xdata and set_ydata
Is there a way of simultaneously setting both xdata and ydata of a line? I need to animate a line with varying number of points in each frame. regards, r. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] how to erase items in figures
On Jan 28, 2008 2:06 PM, j vickroy <[EMAIL PROTECTED]> wrote: > Hello users, > > I wish to repeatedly re-plot labels and contour data on a figure since > redrawing the figure is temporally expensive. The attached script (I > apologize for its length), hopefully, illustrates a simplified version > of what I'm trying to do -- contour temporally-varying data on a map > projection. matplotlib has some support for the kinds of things you are trying to do -- eg draw an expensive part of the figure, save it, plot something on top of it, erase it, restore the original figure, etc. This is convered in some detail in the animation cookbook recipe. Although you are not doing animation, the concepts are quite similar in that both require copying and restoring a background, and updating the "animated" object. http://www.scipy.org/Cookbook/Matplotlib/Animations JDH - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] how to erase items in figures
The error was due to muppetdom of the highest degree... I've created a bash alias which subsituted ipython with ipython ---options. Subsequent use of ipython -pylab put the -pylab tab at the end and it was quietly ignored Sorry to waste people time Andy j vickroy wrote: > Hello users, > > I wish to repeatedly re-plot labels and contour data on a figure since > redrawing the figure is temporally expensive. The attached script (I > apologize for its length), hopefully, illustrates a simplified version > of what I'm trying to do -- contour temporally-varying data on a map > projection. > > I do not understand how to erase the plot label each time the figure > is to be reused. I also do not know how to erase the contour-fill > although, based on the generated PNG files, it does not, for unknown > reasons , appear to be necessary. From some postings, it seems that I > have to employ collections attributes, but I have not been able to > find documentation or examples that illustrate this. > > My system: > >* matplotlib.__version__: '0.91.2' >* sys.version: '2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC > v.1310 32 bit (Intel)]' > > > Thanks, > -- jv > > > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > > > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users