[Matplotlib-users] imshow problem in matplot API?

2008-02-13 Thread hjc520070
In matplot examples,I have never find an image show with matplot API. I am trying to do this. But fail again and again. When I use pylab.imshow to show an image in the form of an array, it works well. For example: from pylab import * array=ReadDem("data/testdem.txt").Array ''' ReadDem is a class

Re: [Matplotlib-users] day-night terminator and/or solar zenith angle code ?

2008-02-13 Thread j vickroy
Christopher Barker wrote: > Jeff Whitaker wrote: >> Jim: I was googling around and found this python code: > > Do be careful way up North or Down south -- some Sunrise/set code > chokes when the sun does not ever rise or set at a given location on a > given day. A quick glance at that code looked

Re: [Matplotlib-users] day-night terminator and/or solar zenith angle code ?

2008-02-13 Thread Jeff Whitaker
Jim Vickroy wrote: > Hello all, > > Could someone offer suggestions for (preferably) python code to compute: > > * day/night terminator position > * solar zenith angle > > > I'm developing a basemap application that is required to hide contour > data in the night regions of the earth. > > T

Re: [Matplotlib-users] basemap and omerc

2008-02-13 Thread Jeff Whitaker
Evan Mason wrote: > Hi Jeff > > Here are the corners: > > lon_corners = N.array([-4.09300764,-35.76003475,-43.72330207, > -12.05627497]) > lat_corners = N.array([41.90278813, 49.2136974, 14.7209971, 7.41008784]) > > The reason for the differences is that the matlab script is very > fiddly, lots o

Re: [Matplotlib-users] basemap and omerc

2008-02-13 Thread Evan Mason
By losing the memory I mean that the grid is no longer rotated; that the rotation I introduced through lat1, lon1, lat2, lon2 is lost. If you look at the latitude of the two bottom corners you see that they are the same, they should be different - for the matlab script they are different. In othe

Re: [Matplotlib-users] basemap and omerc

2008-02-13 Thread Jeff Whitaker
Evan Mason wrote: > Thanks for the replies. The map you produced, Jeff, looks as it > should. However, I am trying to make an ocean model grid, and so I > require two 2d arrays of lon and lat, at my desired grid spacing. > This is why I try the steps: > > dl = 2. > nx = int((M.xmax - M.xm

Re: [Matplotlib-users] Random colourmap?

2008-02-13 Thread Eric Firing
José Gómez-Dans wrote: > Hi, > Is there a simple way to come up with a random colourmap? I need to plot > discrete values, and I would like that the colours do not show a trend, to > easily distinguish them? It might help if you described the application. I am guessing that you have a small nu

Re: [Matplotlib-users] pyinstall and matplotlib

2008-02-13 Thread kc106_2005-matplotlib
Well, looks like nobody has an answer to this question. How'bout py2exe or other ways of creating exe files out of matplotlib projects? Has anybody been able to do that? --- [EMAIL PROTECTED] wrote: > Has anybody been able to create an exe of their > python > applications involving matplotlib u

Re: [Matplotlib-users] basemap and omerc

2008-02-13 Thread Evan Mason
Thanks for the replies. The map you produced, Jeff, looks as it should. However, I am trying to make an ocean model grid, and so I require two 2d arrays of lon and lat, at my desired grid spacing. This is why I try the steps: dl = 2. nx = int((M.xmax - M.xmin) / dl) + 1 ny = int((M.ymax - M.

Re: [Matplotlib-users] Random colourmap?

2008-02-13 Thread Christopher Barker
José Gómez-Dans wrote: > I need to plot > discrete values, and I would like that the colours do not show a trend, to > easily distinguish them? > > I read the cookbook entry on "Doing your own colormap", but can't seem to > bring my mind into it! Once you gfigure that out (sorry, I don't have

[Matplotlib-users] day-night terminator and/or solar zenith angle code ?

2008-02-13 Thread Jim Vickroy
Hello all, Could someone offer suggestions for (preferably) python code to compute: * day/night terminator position * solar zenith angle I'm developing a basemap application that is required to hide contour data in the night regions of the earth. The projections will be Mercator and po

[Matplotlib-users] Random colourmap?

2008-02-13 Thread José Gómez-Dans
Hi, Is there a simple way to come up with a random colourmap? I need to plot discrete values, and I would like that the colours do not show a trend, to easily distinguish them? I read the cookbook entry on "Doing your own colormap", but can't seem to bring my mind into it! Cheers! Jose --

[Matplotlib-users] basemap and omerc

2008-02-13 Thread Tommy Grav
On Feb 12, 2008, at 8:39 PM, Evan Mason wrote: > dl = 2. > nx = int((M.xmax - M.xmin) / dl) + 1 > ny = int((M.ymax - M.ymin) / dl) + 1 > > lonr, latr = M.makegrid(nx, ny) > > plot(lonr, latr, 'c.') > show() I think you might be looking for M.plot() rather than plot()?? plot() will just overw

Re: [Matplotlib-users] healpix and basemap

2008-02-13 Thread Jeff Whitaker
jlu wrote: > Has anyone had any luck plotting a Healpix (sky pixelization used in > astronomy) map using matplotlib basemap... or any other python > plotting package for that matter? > > Cheers, > Jessica > Jessica: I don't know anything about Healpix, but if you are more specific about wh

Re: [Matplotlib-users] basemap and omerc

2008-02-13 Thread Jeff Whitaker
Evan Mason wrote: > Hi, I am having some problems using the oblique mercator projection in > basemap. I want to define a rectangular orthogonal grid, rotated > clockwise by about 13 degrees. I want to define grid cells of size, > say, about 20x20 km. The script I have so far is below. The pr