Re: [Matplotlib-users] Basemap with origin within the plot

2007-10-11 Thread Adam Mercer
On 10/10/2007, Pascoe, S (Stephen) <[EMAIL PROTECTED]> wrote: > Is there a general way of setting the origin somewhere other than the > lower-left corner? I've just had to deal with a similar problem, you need to use the basemap.shiftgrid() method to shift the co-ordinate grid accordingly. Chee

Re: [Matplotlib-users] Small negative values causing graph breaks?

2007-10-11 Thread Stephen George
Hi Joshua, As you can see from the attached graph, there is a break the in graph somewhere around 7 AM or so. This is the data I am graphing for that red line: "2007-10-09 00:00:00",0.015 "2007-10-09 01:00:00",0.015 "2007-10-09 02:00:00",0.014 "2007-10-09 03:00:00",0.012 "2007-10-09 04:00:00

Re: [Matplotlib-users] datestr2num, dateutil.parse and timezone problems

2007-10-11 Thread Charles Seaton
John, I would prefer to be able to use the power and flexibility of datestr2num and the underlying dateutil.parser, rather than writing my own parser. However, looking further at dateutil.parser.parse, it takes an argument tzinfos, which allows timezone names other than the local timezone and UTC

Re: [Matplotlib-users] Basemap projection issue

2007-10-11 Thread Adam Mercer
On 11/10/2007, Jeff Whitaker <[EMAIL PROTECTED]> wrote: > but I think you want > > values, lon = basemap.shiftgrid(180, values, lon, start=False) Thats it! Thanks a lot! Cheers Adam - This SF.net email is sponsored by: Spl

[Matplotlib-users] Small negative values causing graph breaks?

2007-10-11 Thread Joshua J. Kugler
Disclaimer: I do know Python, but am not terribly familiar with Matplotlib as I'm taking over the maintenance of our graphing libraries. This post is likely to leave out details that you need to help diagnose the problem, but I didn't think posting all 1500 or so lines of our graphing routines

Re: [Matplotlib-users] Basemap projection issue

2007-10-11 Thread Jeff Whitaker
Adam Mercer wrote: > On 11/10/2007, Jeff Whitaker <[EMAIL PROTECTED]> wrote: > > >> Adam: I assume your data is on a latitude-longitude grid? You've asked >> for a mollweide projection centered on the Greenwich meridian. Your >> data is not centered on Greenwich - but the error message is try

Re: [Matplotlib-users] embedding matplotlib in C++ and closing the matplotlib window

2007-10-11 Thread John Hunter
On 10/11/07, Alexander Schmolck <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using matplotlib in a C++ app (with a qt4 gui), by embedding python with > boost::python. The C++ app calls Py_Initialize(), init_myplottingmodule(), and > boost::python::import("matplotlib.pylab") once on startup and certain

[Matplotlib-users] Basemap with origin within the plot

2007-10-11 Thread Pascoe, S (Stephen)
I am trying to prepare a plot on the UK national grid. This is a transverse mercator projection centred on the UK with a false origin offset from the projection origin (lat_0, lon_0). The Basemap coordinate system origin (0 Easting and Northing) always seems to be set in the lower-left corner

Re: [Matplotlib-users] datestr2num, dateutil.parse and timezone problems

2007-10-11 Thread John Hunter
On 10/11/07, Charles Seaton <[EMAIL PROTECTED]> wrote: > Any suggestions on how to get either matplotlib.dates.datestr2num or > dateutil.parser.parse to properly handle timezone information in the > datestring would be greatly appreciated. Not sure how to answer this question vis-a-vid dateutil.p

[Matplotlib-users] datestr2num, dateutil.parse and timezone problems

2007-10-11 Thread Charles Seaton
I am having some problems getting matplotlib.dates.datestr2num to handle timezones in the datestring. >import matplotlib >matplotlib.dates.datestr2num('Jan 1, 2007 12:00 PDT') 732677.837 >matplotlib.dates.datestr2num('Jan 1, 2007 12:00 PST') 732677.837 >matplotlib.dates.datestr2nu

Re: [Matplotlib-users] plot three varaibles using matplotlib

2007-10-11 Thread Alain Péan
Hi Yadin, I am a simple user, but I already faced this problem. The idea I used is to plot the data as an image, with magnitudes being converted in color levels. To do that, you have to define an array (let's say 'Z', Z(x,y) with dims len(X) and len(Y) and fill it with tour magnitudes. Then

Re: [Matplotlib-users] Basemap projection issue

2007-10-11 Thread Adam Mercer
On 11/10/2007, Jeff Whitaker <[EMAIL PROTECTED]> wrote: > Adam: I assume your data is on a latitude-longitude grid? You've asked > for a mollweide projection centered on the Greenwich meridian. Your > data is not centered on Greenwich - but the error message is trying to > say that you can shif

Re: [Matplotlib-users] Basemap projection issue

2007-10-11 Thread Adam Mercer
On 11/10/2007, Jeff Whitaker <[EMAIL PROTECTED]> wrote: > Adam: I assume your data is on a latitude-longitude grid? You've asked > for a mollweide projection centered on the Greenwich meridian. Your > data is not centered on Greenwich - but the error message is trying to > say that you can shif

Re: [Matplotlib-users] Basemap projection issue

2007-10-11 Thread Jeff Whitaker
Adam Mercer wrote: > Hi > > I'm running into a problem using the mollweide projection, with the > following simplified code, my actual code doesn't use random data for > values but this is a clearer example to the problem I'm experiencing: > > lon = numpy.arange(0, 361, 1) > lat = numpy.arange(-90,

[Matplotlib-users] plot three varaibles using matplotlib

2007-10-11 Thread yadin Bocuma Rivas
I i have tree lists or array of values list x of 100... values list y of 100.. values list mag of 100.. values list x and y are coordiantes of points and list Mag is magnitude of something at that point how can i plot this quantities using matplotlib, any function please? my code starts as.

Re: [Matplotlib-users] zeros and ones difference between pylab and scipy

2007-10-11 Thread Matthieu Brucher
> > Can this be changed? Is there a better approach I should take in > getting my students started using scipy and pylab together? > Teaching them what is a module and a namespace is a good think, why don't telling them to do : import pylab as pl import numpy as npy for instance so that they ha

[Matplotlib-users] embedding matplotlib in C++ and closing the matplotlib window

2007-10-11 Thread Alexander Schmolck
Hi, I'm using matplotlib in a C++ app (with a qt4 gui), by embedding python with boost::python. The C++ app calls Py_Initialize(), init_myplottingmodule(), and boost::python::import("matplotlib.pylab") once on startup and certain GUI events then fire up a matplotlib window via calls like this one:

[Matplotlib-users] Basemap projection issue

2007-10-11 Thread Adam Mercer
Hi I'm running into a problem using the mollweide projection, with the following simplified code, my actual code doesn't use random data for values but this is a clearer example to the problem I'm experiencing: lon = numpy.arange(0, 361, 1) lat = numpy.arange(-90, 91, 1) x, y = numpy.meshgrid(lon

Re: [Matplotlib-users] zeros and ones difference between pylab and scipy

2007-10-11 Thread John Hunter
On 10/11/07, Ryan Krauss <[EMAIL PROTECTED]> wrote: > Can this be changed? Is there a better approach I should take in > getting my students started using scipy and pylab together? Yes, this was left in initially for backward compatibility but I think we should strive for maximal numpy compatibi

[Matplotlib-users] zeros and ones difference between pylab and scipy

2007-10-11 Thread Ryan Krauss
I have successfully (I think) coerced my students into using Scipy/Numpy for signal processing and dynamic system modeling. They are mechanical engineering coming from a Matlab background. In order to make using Python easy and have it feel like Matlab, I teach them to put from scipy import * f