Re: [Matplotlib-users] macosx lion installation challenges

2012-02-01 Thread Ivan Lima
You can also install the Enthought Python Distribution (EPD
http://enthought.com/products/epd.php). It comes with everything
(NumPy, Matplotlib, IPython, etc) and it is very easy to install on a
Mac.

- Ivan
--
Ivan Lima
Woods Hole Oceanographic Institution, MC&G MS #25
360 Woods Hole Road, Woods Hole, MA 02543-1543 USA



On Fri, Jan 13, 2012 at 21:41, Andrew  wrote:
> Hi
>
> Hi,
>
> I am having troubles  getting matplotlib to install.  I have mac os X lion 
> with Xcode 4.2.1 installed and  I have used git to get the latest version of 
> matplotlib.  I am also running python 2.7.2 from the python.org site. The 
> installation process was going fine based on the make.osx file supplied .  
> The only thing I had to do was add a symbolic link to map gcc-4.2 to gcc to 
> get it to compile, the I hit the following problem:
>
> gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot 
> /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 
> -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 
> -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
>  -I. 
> -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/freetype2
>  -I./freetype2 
> -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c 
> src/ft2font.cpp -o build/temp.macosx-10.6-intel-2.7/src/ft2font.o
> In file included from src/ft2font.cpp:3:
> src/ft2font.h:16:22: error: ft2build.h: No such file or directory
> src/ft2font.h:17:10: error: #include expects "FILENAME" or 
> src/ft2font.h:18:10: error: #include expects "FILENAME" or 
> src/ft2font.h:19:10: error: #include expects "FILENAME" or 
> src/ft2font.h:20:10: error: #include expects "FILENAME" or 
> src/ft2font.h:21:10: error: #include expects "FILENAME" or 
> In file included from src/ft2font.cpp:3:
> src/ft2font.h:34: error: ‘FT_Bitmap’ has not been declared
> src/ft2font.h:34: error: ‘FT_Int’ has not been declared
> src/ft2font.h:34: error: ‘FT_Int’ has not been declared
> src/ft2font.h:86: error: expected ‘,’ or ‘...’ before ‘&’ token
> src/ft2font.h:86: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
> src/ft2font.h:131: error: ‘FT_Face’ does not name a type
> src/ft2font.h:132: error: ‘FT_Matrix’ does not name a type
> src/ft2font.h:133: error: ‘FT_Vector’ does not name a type
> src/ft2font.h:134: error: ‘FT_Error’ does not name a type
> src/ft2font.h:135: error: ‘FT_Glyph’ was not declared in this scope
> src/ft2font.h:135: error: template argument 1 is invalid
> src/ft2font.h:135: error: template argument 2 is invalid
> src/ft2font.h:136: error: ‘FT_Vector’ was not declared in this scope
> src/ft2font.h:136: error: template argument 1 is invalid
> src/ft2font.h:136: error: template argument 2 is invalid
> src/ft2font.h:141: error: ‘FT_BBox’ does not name a type
> src/ft2font.cpp:51: error: ‘FT_Library’ does not name a type
> src/ft2font.cpp:116: error: variable or field ‘draw_bitmap’ declared void
> src/ft2font.cpp:116: error: ‘FT_Bitmap’ was not declared in this scope
> src/ft2font.cpp:116: error: ‘bitmap’ was not declared in this scope
> src/ft2font.cpp:117: error: ‘FT_Int’ was not declared in this scope
> src/ft2font.cpp:118: error: ‘FT_Int’ was not declared in this scope
> In file included from src/ft2font.cpp:3:
> src/ft2font.h:16:22: error: ft2build.h: No such file or directory
> src/ft2font.h:17:10: error: #include expects "FILENAME" or 
> src/ft2font.h:18:10: error: #include expects "FILENAME" or 
> src/ft2font.h:19:10: error: #include expects "FILENAME" or 
> src/ft2font.h:20:10: error: #include expects "FILENAME" or 
> src/ft2font.h:21:10: error: #include expects "FILENAME" or 
> In file included from src/ft2font.cpp:3:
> src/ft2font.h:34: error: ‘FT_Bitmap’ has not been declared
> src/ft2font.h:34: error: ‘FT_Int’ has not been declared
> src/ft2font.h:34: error: ‘FT_Int’ has not been declared
> src/ft2font.h:86: error: expected ‘,’ or ‘...’ before ‘&’ token
> src/ft2font.h:86: error: ISO C++ forbids declaration of ‘FT_Face’ with no type
> src/ft2font.h:131: error: ‘FT_Face’ does not name a type
> src/ft2font.h:132: error: ‘FT_Matrix’ does not name a type
> src/ft2font.h:133: error: ‘FT_Vector’ does not name a type
> src/ft2font.h:134: error: ‘FT_Error’ does not name a type
> src/ft2font.h:135: error: ‘FT_Glyph’ was not declared in this scope
> src/ft2font.h:135: error: template argument 1 is invalid
> src/ft2font.h:135: error: template argument 2 is invalid
> src/ft2font.h:136: error: ‘FT_Vector’ was not declared in this scope
> src/ft2font.h:136: error: template argument 1 is invalid
> src/ft2font.h:136: error: template argument 2 is invalid
> src/ft2font.h:141: error: ‘FT_BBox’ does not name a type
> src/ft2font.cpp:51: error: ‘FT_Library’ does not name a type
> src/ft2font.cpp:116: error: variable or field ‘draw_bitmap’ declared void
> src/ft2font.cpp:116: error: ‘FT_Bitmap’ was not declared in this scope
> src/ft2fo

Re: [Matplotlib-users] macosx lion installation challenges

2012-02-01 Thread Jeff Whitaker
On 2/1/12 7:11 AM, Ivan Lima wrote:
> You can also install the Enthought Python Distribution (EPD
> http://enthought.com/products/epd.php). It comes with everything
> (NumPy, Matplotlib, IPython, etc) and it is very easy to install on a
> Mac.
>
> - Ivan
> --
> Ivan Lima
> Woods Hole Oceanographic Institution, MC&G MS #25
> 360 Woods Hole Road, Woods Hole, MA 02543-1543 USA

Another relatively painless option is macports (http://macports.org), 
which has matplotlib-1.1.0 and basemap-1.0.2.  For me it was as simple as

sudo port install py27-matplotlib

-Jeff
>
>
>
> On Fri, Jan 13, 2012 at 21:41, Andrew  wrote:
>> Hi
>>
>> Hi,
>>
>> I am having troubles  getting matplotlib to install.  I have mac os X lion 
>> with Xcode 4.2.1 installed and  I have used git to get the latest version of 
>> matplotlib.  I am also running python 2.7.2 from the python.org site. The 
>> installation process was going fine based on the make.osx file supplied .  
>> The only thing I had to do was add a symbolic link to map gcc-4.2 to gcc to 
>> get it to compile, the I hit the following problem:
>>
>> gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot 
>> /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g 
>> -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 
>> -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
>>  -I. 
>> -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/freetype2
>>  -I./freetype2 
>> -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c 
>> src/ft2font.cpp -o build/temp.macosx-10.6-intel-2.7/src/ft2font.o
>> In file included from src/ft2font.cpp:3:
>> src/ft2font.h:16:22: error: ft2build.h: No such file or directory
>> src/ft2font.h:17:10: error: #include expects "FILENAME" or
>> src/ft2font.h:18:10: error: #include expects "FILENAME" or
>> src/ft2font.h:19:10: error: #include expects "FILENAME" or
>> src/ft2font.h:20:10: error: #include expects "FILENAME" or
>> src/ft2font.h:21:10: error: #include expects "FILENAME" or
>> In file included from src/ft2font.cpp:3:
>> src/ft2font.h:34: error: ‘FT_Bitmap’ has not been declared
>> src/ft2font.h:34: error: ‘FT_Int’ has not been declared
>> src/ft2font.h:34: error: ‘FT_Int’ has not been declared
>> src/ft2font.h:86: error: expected ‘,’ or ‘...’ before ‘&’ token
>> src/ft2font.h:86: error: ISO C++ forbids declaration of ‘FT_Face’ with no 
>> type
>> src/ft2font.h:131: error: ‘FT_Face’ does not name a type
>> src/ft2font.h:132: error: ‘FT_Matrix’ does not name a type
>> src/ft2font.h:133: error: ‘FT_Vector’ does not name a type
>> src/ft2font.h:134: error: ‘FT_Error’ does not name a type
>> src/ft2font.h:135: error: ‘FT_Glyph’ was not declared in this scope
>> src/ft2font.h:135: error: template argument 1 is invalid
>> src/ft2font.h:135: error: template argument 2 is invalid
>> src/ft2font.h:136: error: ‘FT_Vector’ was not declared in this scope
>> src/ft2font.h:136: error: template argument 1 is invalid
>> src/ft2font.h:136: error: template argument 2 is invalid
>> src/ft2font.h:141: error: ‘FT_BBox’ does not name a type
>> src/ft2font.cpp:51: error: ‘FT_Library’ does not name a type
>> src/ft2font.cpp:116: error: variable or field ‘draw_bitmap’ declared void
>> src/ft2font.cpp:116: error: ‘FT_Bitmap’ was not declared in this scope
>> src/ft2font.cpp:116: error: ‘bitmap’ was not declared in this scope
>> src/ft2font.cpp:117: error: ‘FT_Int’ was not declared in this scope
>> src/ft2font.cpp:118: error: ‘FT_Int’ was not declared in this scope
>> In file included from src/ft2font.cpp:3:
>> src/ft2font.h:16:22: error: ft2build.h: No such file or directory
>> src/ft2font.h:17:10: error: #include expects "FILENAME" or
>> src/ft2font.h:18:10: error: #include expects "FILENAME" or
>> src/ft2font.h:19:10: error: #include expects "FILENAME" or
>> src/ft2font.h:20:10: error: #include expects "FILENAME" or
>> src/ft2font.h:21:10: error: #include expects "FILENAME" or
>> In file included from src/ft2font.cpp:3:
>> src/ft2font.h:34: error: ‘FT_Bitmap’ has not been declared
>> src/ft2font.h:34: error: ‘FT_Int’ has not been declared
>> src/ft2font.h:34: error: ‘FT_Int’ has not been declared
>> src/ft2font.h:86: error: expected ‘,’ or ‘...’ before ‘&’ token
>> src/ft2font.h:86: error: ISO C++ forbids declaration of ‘FT_Face’ with no 
>> type
>> src/ft2font.h:131: error: ‘FT_Face’ does not name a type
>> src/ft2font.h:132: error: ‘FT_Matrix’ does not name a type
>> src/ft2font.h:133: error: ‘FT_Vector’ does not name a type
>> src/ft2font.h:134: error: ‘FT_Error’ does not name a type
>> src/ft2font.h:135: error: ‘FT_Glyph’ was not declared in this scope
>> src/ft2font.h:135: error: template argument 1 is invalid
>> src/ft2font.h:135: error: template argument 2 is invalid
>> src/ft2font.h:136: error: ‘FT_Vector’ was not declared in this scope
>> src/ft2font.h:136: error: template argument 1 is invalid
>> src/ft2font.h:136: e

[Matplotlib-users] Plotting irregular data without interpolation

2012-02-01 Thread Alexis Praga
Hi,

I have not found any documentation on plotting non regular data with
basemap *without* interpolation.
Plotting scattered data on the sphere works fine, but the size of each
point seems to be limited, so there are "holes".
Is there an option in basemap for that ?


Alexis

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting irregular data without interpolation

2012-02-01 Thread Benjamin Root
On Wed, Feb 1, 2012 at 9:59 AM, Alexis Praga  wrote:

> Hi,
>
> I have not found any documentation on plotting non regular data with
> basemap *without* interpolation.
> Plotting scattered data on the sphere works fine, but the size of each
> point seems to be limited, so there are "holes".
> Is there an option in basemap for that ?
>
>
> Alexis
>
>
pcolor might be what you want (not pcolormesh()).  I use it to plot radar
data when there might be gaps in the coverage.

Ben Root
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting irregular data without interpolation

2012-02-01 Thread Jeff Whitaker

On 2/1/12 9:15 AM, Benjamin Root wrote:



On Wed, Feb 1, 2012 at 9:59 AM, Alexis Praga > wrote:


Hi,

I have not found any documentation on plotting non regular data with
basemap *without* interpolation.
Plotting scattered data on the sphere works fine, but the size of each
point seems to be limited, so there are "holes".
Is there an option in basemap for that ?


Alexis


pcolor might be what you want (not pcolormesh()).  I use it to plot 
radar data when there might be gaps in the coverage.


Ben Root


To do this you will have to bin your data into rectangular grid boxes, 
filling a masked array (with the grid boxes that have no data masked).  
There's some code to this at


http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data

-Jeff

--
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting irregular data without interpolation

2012-02-01 Thread Jeff Whitaker

On 2/1/12 9:39 AM, Jeff Whitaker wrote:

On 2/1/12 9:15 AM, Benjamin Root wrote:



On Wed, Feb 1, 2012 at 9:59 AM, Alexis Praga > wrote:


Hi,

I have not found any documentation on plotting non regular data with
basemap *without* interpolation.
Plotting scattered data on the sphere works fine, but the size of
each
point seems to be limited, so there are "holes".
Is there an option in basemap for that ?


Alexis


pcolor might be what you want (not pcolormesh()).  I use it to plot 
radar data when there might be gaps in the coverage.


Ben Root


To do this you will have to bin your data into rectangular grid boxes, 
filling a masked array (with the grid boxes that have no data 
masked).  There's some code to this at


http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data

-Jeff



and here's an example of how to do this with the matplotlib hexbin 
function...


from numpy.random import uniform
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.basemap import Basemap
npts = 5000
m = Basemap(lon_0=270, boundinglat=20, projection='npstere')
# create randomly distributed points in map projection coordinates
x = uniform(m.xmin,m.xmax,npts)
y = uniform(m.ymin,m.ymax,npts)
xscaled = 4.*(x-0.5*(m.xmax-m.xmin))/m.xmax
yscaled = 4.*(y-0.5*(m.ymax-m.ymin))/m.ymax
# z is the data to plot at those points.
z = xscaled*np.exp(-xscaled**2-yscaled**2)
CS = plt.hexbin(x,y,C=z,gridsize=50,cmap=plt.cm.jet)
m.drawcoastlines()
m.drawparallels(np.arange(0,81,20))
m.drawmeridians(np.arange(-180,181,60))
m.colorbar() # draw colorbar
plt.show()

-Jeff

--
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] specgram

2012-02-01 Thread David Craig
Hi, I am trying to produce a spectrogram for my data set and am having 
an issue with the color map. My data is filtered between 0.02 and 1.0Hz, 
but specgram() produces an image in the range 0 to 10Hz. Also the color 
map is not set properly. I would like to have it so the colormap ranges 
from the min and max powers obtained by specgram. Anyone know how to do 
this? My code is below.

Pxx, freqs, bins, im = plt.specgram(data, NFFT=nfft, Fs=sps, 
detrend=py.detrend_none, window=py.window_hanning, noverlap=nfft/2, 
cmap=None, xextent=None, pad_to=None, sides='default', scale_by_freq=None)
plt.ylim(0,1)
plt.colorbar()
plt.show()

thanks,
D

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] seconds to julian time

2012-02-01 Thread David Craig
Hi,
I have a plot that covers a 10 day period on its x-axis in seconds. I 
would like to change it to julian days, is this possible with matplotlib 
and if so how do I do it??
D

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Sampling a 3D plane to 2D data

2012-02-01 Thread Benjamin Root
On Tue, Jan 31, 2012 at 12:19 AM, Christoph Piefke <
anmeld...@dunklevollnuss.de> wrote:

> Hello everybody,
>
> I have a problem transferring from 3D data to a 2D representation.
> I used mayavi to define a cut plane through a volume data set and got
> the xyz
> coordinates for the points on the plane and the data at each point.
>
> Now I would like to make a contour plot of that data in matplotlib.
>
> My first try was rotating the normal of the cut plane parallel to the
> z-axes and leaving the data unchanged.
> Unfortunately, this changed the number of grid points, so I do not know
> how to fit these both sets together.
>
> Is there a convenient way how to sample these 3d data and put it on a 2d
> grid?
>
> Thank you very much in advance, Chris
>
>
I have attached an example that was provided by a fellow user recently that
might be of use.  I am seeing how to either modify it to include it into
mplot3d or to at least include it in the gallary examples.

I hope it is helpful to you!

Ben Root

from itertools import izip
import scipy as sp
import matplotlib._cntr as cntr
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D


def contour3D(x, y, z, v, levels):
if len(levels) > 6:
print 'Too many levels specified, should be no more than 6.'
return


# clist is the apparently impossible to find default clist for mpl
clist = ['b','g','r','c','m','y','k']
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

for lev,color in izip(levels, clist):

# do xy planes
for k in xrange(0,x.shape[2]):
c = cntr.Cntr(x[:,:,k], y[:,:,k], v[:,:,k]).trace(lev)
for m in xrange(0, len(c)/2):
ax.plot(c[m][:,0], c[m][:,1], z[0,0,k] * sp.ones_like(c[m][:,0]), color)

# do xz planes
for k in xrange(0, x.shape[1]):
c = cntr.Cntr(x[:,k,:], z[:,k,:], v[:,k,:]).trace(lev)
for m in xrange(0, len(c)/2):
ax.plot(c[m][:,0], y[0,k,0] * sp.ones_like(c[m][:,0]), c[m][:,1], color)

# do yz planes
for k in xrange(0, x.shape[0]):
c = cntr.Cntr(y[k,:,:], z[k,:,:], v[k,:,:]).trace(lev)
for m in xrange(0, len(c)/2):
ax.plot(x[k,0,0] * sp.ones_like(c[m][:,0]), c[m][:,0], c[m][:,1], color)

plt.show()

if __name__ == "__main__":
x,y,z = sp.mgrid[0:1:32j, 0:1:32j, 0:1:32j]
v = sp.sqrt(x**2 + y**2 + z**2)

contour3D(x, y, z, v, sp.r_[0.1:1:6j])


--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-01 Thread Jim St.Cyr
Hello-

Scenario:

Basemap used to display the East Coast of the US and the Atlantic Ocean.
Shapelib is used read a shapefile the contents of is pumped into a PyPlot 
subplot hosted Line Collection which overlays the ocean with a grid
PyPlot text is used to label each grid with it's designator.

What I want to do is plot a collection of points, save the result as a PNG, 
clear the first set of points, plot another collection of points, save the 
result, and so on.  The problem is the if I use the Pyplot clf function it 
wipes 
everything previously built.

What do I need to do in order to clear just the points without clearing 
everything?

Thank you.

Jim

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Show custom tool on NavToolbar staying pressed in

2012-02-01 Thread C M
The standard navigation toolbar has tools that press in and stay pressed to
put the interation into a "mode", like zoom mode or pan mode.  You press
the zoom tool, it stays shown as pressed in while it's in that mode.

I am trying to add a new custom tool to the toolbar, and want it to put
things into a mode as well, and therefore stay pressed in until pressed
again.  How do I do that?

This is using the wxAgg backend.  I searched through backend_wxagg and
backend_bases and couldn't figure it out.  Normally in wxPython you specify
the style of a tool as having, to quote its API, "wxITEM_CHECK for a
checkable tool (such tool stays pressed after it had been toggled) "  Here
I didn't see any option for that.

Thanks,
Che
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Show custom tool on NavToolbar staying pressed in

2012-02-01 Thread C M
On Wed, Feb 1, 2012 at 5:25 PM, C M  wrote:

> The standard navigation toolbar has tools that press in and stay pressed
> to put the interation into a "mode", like zoom mode or pan mode.  You press
> the zoom tool, it stays shown as pressed in while it's in that mode.
>

CORRECTION:  My mistake, it's not really shown pressed,  more like
"selected," with a blue thin line highlighting its perimeter.  In any case,
it's a cue to the user that the UI is in that mode.  That's what I'd like
my custom tool to have.
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users