[Matplotlib-users] Custom colorbar tick labeling
Hi, There was a recent unanswered post on this topic. I hope the attached script is useful and makes it's way into the Matplotlib examples. Thanks for a great library, Scott Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/ colorbar_tick_labelling_demo.py Description: Binary data - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] no canvas reinitialization between calls to savefig
I can reproduce Thomas' problem with Agg backend. It does not happen if frame_on is True. And I guess Thomas' guess in the first email might be right. I had a quick look at the mpl source and I don't think draw(), clf() or savefig() try to clear the canvas. The problem is not visible if frame_on is True. Thomas, Put following line after the savefig() function fig.canvas._lastKey = None and see if it solves the problem (savefig command in your original email is outside the for loop, I guess this was a typo). The Agg backend has a clear() method which fills the canvas with (1, 1, 1, 0). I tried to put this method in a few different places. It worked for savefig(), but I couldn't get it work in the interactive backend (GtkAgg). Regards, -JJ On Fri, Oct 31, 2008 at 6:35 AM, Thomas Pfaff [EMAIL PROTECTED] wrote: Hi, Thanks for the quick reply. My OS is Windows XP with Service Pack 3 I'm using an easy-install .egg distribution. Whether I downloaded it somewhere or simply installed it using easy-install, I don't remember. I have another version of matplotlib (0.91.2) installed, which does not seem to be used. This one was installed using the Windows installer from the matplotlib homepage. This should not interfere, should it? Running the script with --verbose-helpful gives the following results (I removed parts of the path information) $HOME=\pfaff CONFIGDIR=\pfaff\.matplotlib matplotlib data path \python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\mpl -data loaded rc file \python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\mpl -data\matplotlibrc matplotlib version 0.98.3 verbose.level helpful interactive is False units is False platform is win32 Using fontManager instance from \pfaff\.matplotlib\fontManager.cache backend TkAgg version 8.4 Now that I think of it: In the IPython reference, I read about possible problems with tk. When starting IPython I use -pylab -tk because otherwise I can only do one plot and the plotting window hangs once I issue another plotting command. As I didn't find where to tell matplotlib to behave like these two switches were set, I get by with constantly restarting my interpreter when working interactively. Could this be part of the problem? Cheers, Thomas -Original Message- From: Michael Droettboom [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2008 2:21 PM To: Thomas Pfaff Cc: matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] no canvas reinitialization between calls to savefig I can't reproduce this here with SVN trunk. I get what you expect. Can you provide the information outlined here: http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a- problem as well as the backend you are using? Cheers, Mike - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] no canvas reinitialization between calls to savefig
Hi, Thanks for the quick reply. My OS is Windows XP with Service Pack 3 I'm using an easy-install .egg distribution. Whether I downloaded it somewhere or simply installed it using easy-install, I don't remember. I have another version of matplotlib (0.91.2) installed, which does not seem to be used. This one was installed using the Windows installer from the matplotlib homepage. This should not interfere, should it? Running the script with --verbose-helpful gives the following results (I removed parts of the path information) $HOME=\pfaff CONFIGDIR=\pfaff\.matplotlib matplotlib data path \python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\mpl -data loaded rc file \python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\mpl -data\matplotlibrc matplotlib version 0.98.3 verbose.level helpful interactive is False units is False platform is win32 Using fontManager instance from \pfaff\.matplotlib\fontManager.cache backend TkAgg version 8.4 Now that I think of it: In the IPython reference, I read about possible problems with tk. When starting IPython I use -pylab -tk because otherwise I can only do one plot and the plotting window hangs once I issue another plotting command. As I didn't find where to tell matplotlib to behave like these two switches were set, I get by with constantly restarting my interpreter when working interactively. Could this be part of the problem? Cheers, Thomas -Original Message- From: Michael Droettboom [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2008 2:21 PM To: Thomas Pfaff Cc: matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] no canvas reinitialization between calls to savefig I can't reproduce this here with SVN trunk. I get what you expect. Can you provide the information outlined here: http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a- problem as well as the backend you are using? Cheers, Mike - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] no canvas reinitialization between calls to savefig
On Fri, Oct 31, 2008 at 6:43 AM, Jae-Joon Lee [EMAIL PROTECTED] wrote: The Agg backend has a clear() method which fills the canvas with (1, 1, 1, 0). I tried to put this method in a few different places. It worked for savefig(), but I couldn't get it work in the interactive backend (GtkAgg). I think what you are seeing is the problem I described here http://www.nabble.com/gtkagg-pixel-buffer-bug-td18051692.html#a18051692 I spent some time working on it and came to the following conclusion: if the mpl figure is fully transparent, you see whatever is in the gui rendering buffer, which may be unintiialized memory. In some sense, mpl is doing what is asked of it, making a fully transparent figure. Clearing the agg buffer is not enough if it is transparent -- you also have to init the canvas buffer. The question is: with what? JDH - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Custom colorbar tick labeling
Thanks. I've committed this to SVN and should end up in the online docs next time they are regenerated. Cheers, Mike Scott Sinclair wrote: Hi, There was a recent unanswered post on this topic. I hope the attached script is useful and makes it's way into the Matplotlib examples. Thanks for a great library, Scott Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ 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 the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] no canvas reinitialization between calls to savefig
Hi Jae-Joon, yes, that solved it. Thank you very much. The savefig command should have been inside the for-loop. Thomas -Original Message- From: Jae-Joon Lee [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2008 12:43 PM To: Thomas Pfaff Cc: Michael Droettboom; matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] no canvas reinitialization between calls to savefig I can reproduce Thomas' problem with Agg backend. It does not happen if frame_on is True. And I guess Thomas' guess in the first email might be right. I had a quick look at the mpl source and I don't think draw(), clf() or savefig() try to clear the canvas. The problem is not visible if frame_on is True. Thomas, Put following line after the savefig() function fig.canvas._lastKey = None and see if it solves the problem (savefig command in your original email is outside the for loop, I guess this was a typo). The Agg backend has a clear() method which fills the canvas with (1, 1, 1, 0). I tried to put this method in a few different places. It worked for savefig(), but I couldn't get it work in the interactive backend (GtkAgg). Regards, - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] using ginput with images -- axes are resized?
hi, I am trying to use ginput with some images and for some reason it keeps changing the axes with the mouse click. I don't know if this is a feature or bug, but I would like it not to affect my images at all. here is a short example: #--- from pylab import ginput, imshow, rand t=rand(50,50) imshow(t) x = ginput(1) #--- this problem was also addressed in a post back in august: http://www.nabble.com/ginput-changes-axes-limits-td18863282.html#a18863282 but it received no replies. any ideas on whats going on? thanks, adam. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] using ginput with images -- axes are resized?
Adam wrote: hi, I am trying to use ginput with some images and for some reason it keeps changing the axes with the mouse click. I don't know if this is a feature or bug, but I would like it not to affect my images at all. Confirmed: it's a big bug. I suspect it has a simple fix, but I don't have time to look into it. Eric here is a short example: #--- from pylab import ginput, imshow, rand t=rand(50,50) imshow(t) x = ginput(1) #--- this problem was also addressed in a post back in august: http://www.nabble.com/ginput-changes-axes-limits-td18863282.html#a18863282 but it received no replies. any ideas on whats going on? thanks, adam. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users