Ivan Lima | 1 Feb 15:11

Re: macosx lion installation challenges

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 <andrew_inbox <at> yahoo.com> 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:
(Continue reading)

Jeff Whitaker | 1 Feb 16:43
Picon
Favicon

Re: macosx lion installation challenges

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<andrew_inbox <at> yahoo.com>  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:
(Continue reading)

Alexis Praga | 1 Feb 16:59
Picon
Favicon

Plotting irregular data without interpolation

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
Benjamin Root | 1 Feb 17:15
Picon
Favicon

Re: Plotting irregular data without interpolation



On Wed, Feb 1, 2012 at 9:59 AM, Alexis Praga <alexis.praga-GANU6spQydw@public.gmane.org> 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@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Jeff Whitaker | 1 Feb 17:39
Picon
Favicon

Re: Plotting irregular data without interpolation

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


On Wed, Feb 1, 2012 at 9:59 AM, Alexis Praga <alexis.praga-GANU6spQydw@public.gmane.org> 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/PSD1 Email : Jeffrey.S.Whitaker-32lpuo7BZBA@public.gmane.org 325 Broadway Office : 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@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Jeff Whitaker | 1 Feb 18:04
Picon
Favicon

Re: Plotting irregular data without interpolation

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 <alexis.praga-GANU6spQydw@public.gmane.org> 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/PSD1 Email : Jeffrey.S.Whitaker-32lpuo7BZBA@public.gmane.org 325 Broadway Office : 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@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
David Craig | 1 Feb 18:15
Picon

specgram

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
David Craig | 1 Feb 19:55
Picon

seconds to julian time

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
Benjamin Root | 1 Feb 20:41
Picon
Favicon

Re: Sampling a 3D plane to 2D data


On Tue, Jan 31, 2012 at 12:19 AM, Christoph Piefke <anmeldung-+5/Onnu2+BS/YrWf78bEE7NAH6kLmebB@public.gmane.org> 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


Attachment (cntr3d.py): text/x-python, 1535 bytes
------------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Jim St.Cyr | 1 Feb 23:07
Picon

How Clear Points Without Wiping Everything?

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

Gmane