Re: [Matplotlib-users] Draggable matplotlib legend

2010-01-28 Thread Fernando Perez
On Thu, Jan 28, 2010 at 8:01 PM, Christopher Barker wrote: > Might I suggest that that be made: > > leg.draggable(True) > leg.draggable(False) > Agreed. My favorite api for toggles is: _state = True def toggle(state=None): global _state old = _state if state is None: _state

Re: [Matplotlib-users] Draggable matplotlib legend

2010-01-28 Thread Christopher Barker
> On Thu, Jan 28, 2010 at 3:48 PM, John Hunter Cool -- nice example. I added the code to legend.py. Now you can do > > leg = ax.legend() > leg.draggable() > > to enable draggable mode. You can repeatedly call this func to toggle > the draggable state. Might I suggest that

Re: [Matplotlib-users] conourf() subplots with a single colorbar

2010-01-28 Thread Sharaf Al-Sharif
I achieved what I want by putting the colorbar on a separate figure to be included beneath the the two columns of subplots using the LaTeX subfloat environment. Wouldn't have known how to do that without the example, so thanks again. Sharaf On 29 January 2010 03:14, Sharaf Al-Sharif wrote: > Th

Re: [Matplotlib-users] conourf() subplots with a single colorbar

2010-01-28 Thread Sharaf Al-Sharif
Thank you very much. That was very helpful. The only thing now is that I have a set of quiver subplots (in a sparate figure) that I want to keep aligned to the contour subplots. After adding a horizontal colorbar at the bottom of the contour figure in a way similar to the example, I lose the alignm

Re: [Matplotlib-users] using the symbol font in TeX plots

2010-01-28 Thread Gökhan Sever
On Tue, Jan 26, 2010 at 11:29 AM, Michael Droettboom wrote: > per freem wrote: > > Hi all, > > > > To annotate my figures with Greek letters, I use the following: > > > > import matplotlib > > matplotlib.use('PDF') > > import matplotlib.pyplot as plt > > from matplotlib import rc > > rc('font',**{

Re: [Matplotlib-users] Draggable matplotlib legend

2010-01-28 Thread Gökhan Sever
On Thu, Jan 28, 2010 at 3:48 PM, John Hunter wrote: > On Thu, Jan 28, 2010 at 3:02 PM, Adam Fraser > wrote: > > I thought I'd share a solution to the draggable legend problem since > > it took me forever to assimilate all the scattered knowledge on the > > mailing lists... > > Cool -- nice examp

Re: [Matplotlib-users] Draggable matplotlib legend

2010-01-28 Thread John Hunter
On Thu, Jan 28, 2010 at 3:02 PM, Adam Fraser wrote: > I thought I'd share a solution to the draggable legend problem since > it took me forever to assimilate all the scattered knowledge on the > mailing lists... Cool -- nice example. I added the code to legend.py. Now you can do leg = ax.legen

[Matplotlib-users] Draggable matplotlib legend

2010-01-28 Thread Adam Fraser
I thought I'd share a solution to the draggable legend problem since it took me forever to assimilate all the scattered knowledge on the mailing lists... class DraggableLegend: def __init__(self, legend): self.legend = legend self.gotLegend = False legend.figure.canvas.

Re: [Matplotlib-users] re ndering bug in bar3d

2010-01-28 Thread baxelrod
I am also seeing this behavior and it is unfortunately holding my project back. I have seen it with python 2.6 on Debian Linux and Windows XP. I have seen it in version 0.99.1 and the latest SVN tree (as of yesterday). I want to highlight a portion of each 3d bar with another color. This i

Re: [Matplotlib-users] conourf() subplots with a single colorbar

2010-01-28 Thread Eric Firing
Sharaf Al-Sharif wrote: > Hi, > I'm trying to make a figure with a column of contourf() subplots using > matplotlib.pyplot. The contour plots have the same levels and I only > need one color bar. The problem is that I'm not sure how to place the > color bar in the figure without messing up the a

Re: [Matplotlib-users] Possible bug with contour, alpha blending and vector output

2010-01-28 Thread Eric Firing
Sourav K. Mandal wrote: > Hello, > > I am using Matplotlib version 0.99.1.1. > > I have a simple problem: when outputting to PDF or SVG, alpha blending > does not work for the lines drawn by "contour". However, alpha blending > does work for the regions given by "contourf". > You are right,

[Matplotlib-users] conourf() subplots with a single colorbar

2010-01-28 Thread Sharaf Al-Sharif
Hi, I'm trying to make a figure with a column of contourf() subplots using matplotlib.pyplot. The contour plots have the same levels and I only need one color bar. The problem is that I'm not sure how to place the color bar in the figure without messing up the alignment of the subplots. Can someone

[Matplotlib-users] Possible bug with contour, alpha blending and vector output

2010-01-28 Thread Sourav K. Mandal
Hello, I am using Matplotlib version 0.99.1.1. I have a simple problem: when outputting to PDF or SVG, alpha blending does not work for the lines drawn by "contour". However, alpha blending does work for the regions given by "contourf". Both work when outputting to PNG. My Python script (and

[Matplotlib-users] Problems with clabel in manual mode

2010-01-28 Thread Thomas Ingeman-Nielsen
(Sorry for the missing text, this was my first post. Should probably send as plain text!) Hi, I'm having trouble with the clabel command. When using auto mode, it scatters the lables at non-optimal locations (see attached plot). When trying to use the manual switch, the figure does not react to m

[Matplotlib-users] Problems with clabel in manual mode

2010-01-28 Thread Thomas Ingeman-Nielsen
Hi, I'm having trouble with the clabel command. When using auto mode, it scatters the lables at non-optimal locations (see attached plot). When trying to use the manual switch, the figure does not react to my mouse clicks, and errors occur when trying to use the keyboard alternatives. I'm using P

Re: [Matplotlib-users] Problem with TkAgg backend on Windows version of EPD 6.0.0?

2010-01-28 Thread Michael Droettboom
It looks like EPD's version of matplotlib wasn't built with the _tkagg extension (it is an optional component). This e-mail thread [1] seems to suggest that it has gone in and out of EPD (though it's supposed to be back in 6.0). Of course, I don't usually run EPD or Windows myself, so I'm com

[Matplotlib-users] Problem with TkAgg backend on Windows version of EPD 6.0.0?

2010-01-28 Thread Bradley Minch
Hi everyone, I would like to develop a Tkinter GUI application for a course that I am teaching this semester that has an embedded matplotlib plot. I was hoping to have this application work with both the Mac OS X and Windows versions of Enthought Python Distribution v. 6.0.0. As a starting p

Re: [Matplotlib-users] basemap problem

2010-01-28 Thread Gary Ruben
OK, that worked. Sorry for the noise. I forgot basemap gets put under site-packages/mpl_toolkits. When I installed a second copy using the basemap binary installer, it went under site-packages and caused some sort of conflict. Gary Gary Ruben wrote: > Hang on - I just noticed EPD says it conta

Re: [Matplotlib-users] basemap problem

2010-01-28 Thread Gary Ruben
Hang on - I just noticed EPD says it contains basemap already, so maybe installing over the top of it did something - I'll trying uninstalling and doing a repair of EPD. Gary Gary Ruben wrote: > I just installed the latest EPD 6.0.2 Python 2.6-based distribution in > WinXP. The mpl version is

[Matplotlib-users] basemap problem

2010-01-28 Thread Gary Ruben
I just installed the latest EPD 6.0.2 Python 2.6-based distribution in WinXP. The mpl version is 0.99.1.1 and I installed basemap using the basemap-0.99.4.win32-py2.6.exe binary installer. I'm getting this traceback. Any ideas? Gary -- In [1]: from mpl_toolkits.basemap import Basemap -