[Matplotlib-users] Plot dates and julian dates on the same figure

2006-08-10 Thread Yannick Copin
Hi,

I'd like to plot some dates on a figure with two different x-axes: the 
bottom one with date labels (strings), and the top one with julian date 
labels (integers), see 
http://www.astrosurf.com/snweb2/2005/05el/curves/05elF_10.jpg for an 
example.

I tried to follow the method mentionned in 
http://sourceforge.net/mailarchive/message.php?msg_id=11822985, but 
unfortunately, this didn't work: as mentionned in 
http://sourceforge.net/mailarchive/message.php?msg_id=11824491, it looks 
impossible to use different tick formatters for different axes (in my 
case a DateFormatter for the bottom axis, and a FormatStrFormatter for 
the top one).

Any suggestion for this???

Cheers.

PS: as a side-question, is there an integrated way to convert a date 
(e.g. matplotlib.datetime.date(2006,8,10)) to a julian date (2453958) 
using matplotlib?
-- 
 /  \ ,,
   _._ _ |oo| _  / \__/ \
  _   ((/ () \))   /  \  Yannick COPIN  (o:>*  Doctus cum libro
  |/|  (  )|oo|  Institut de physique nucleaire de Lyon
   \/  _`\  /'_/  \(IN2P3 - France)
   /   /.-' /\<>/\ `\.( () )_._  Tel: (33/0) 472 431 968
   |`  /  \/  \  /`'--') http://snovae.in2p3.fr/ycopin/
\__,-'`|  |.  |\/ |/\/\|"\"` AIM: YcCopinICQ: 236931013
   jgs |  |.  | \___/\___/
   |  |.  |   ||

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plot dates and julian dates on the same figure

2006-08-10 Thread Theodore R Drain
Well I can help with the smallest of your problems:

MPL uses days past 1/1/1 0:0:0 and
01-JAN-0001 00:00:00 in JD = 1721425.5

so:  JD = MPL_DAY + 1721425.5

but - there is no "integrated" way to do this automatically inside the plotting 
system.

Ted


- Original Message -
From: Yannick Copin <[EMAIL PROTECTED]>
Date: Thursday, August 10, 2006 5:16 am
Subject: [Matplotlib-users] Plot dates and julian dates on the same figure

> Hi,
> 
> I'd like to plot some dates on a figure with two different x-axes: 
> the 
> bottom one with date labels (strings), and the top one with julian 
> date 
> labels (integers), see 
> http://www.astrosurf.com/snweb2/2005/05el/curves/05elF_10.jpg for 
> an 
> example.
> 
> I tried to follow the method mentionned in 
> http://sourceforge.net/mailarchive/message.php?msg_id=11822985, 
> but 
> unfortunately, this didn't work: as mentionned in 
> http://sourceforge.net/mailarchive/message.php?msg_id=11824491, it 
> looks 
> impossible to use different tick formatters for different axes (in 
> my 
> case a DateFormatter for the bottom axis, and a FormatStrFormatter 
> for 
> the top one).
> 
> Any suggestion for this???
> 
> Cheers.
> 
> PS: as a side-question, is there an integrated way to convert a 
> date 
> (e.g. matplotlib.datetime.date(2006,8,10)) to a julian date 
> (2453958) 
> using matplotlib?
> -- 
> /  \ ,,
>   _._ _ |oo| _  / \__/ \
>  _   ((/ () \))   /  \  Yannick COPIN  (o:>*  Doctus cum 
> libro  |/|  (  )|oo|  Institut de physique 
> nucleaire de Lyon
>   \/  _`\  /'_/  \(IN2P3 - 
> France)   /   /.-' /\<>/\ `\.( () )_._  Tel: (33/0) 472 431 968
>   |`  /  \/  \  /`'--') http://snovae.in2p3.fr/ycopin/
>\__,-'`|  |.  |\/ |/\/\|"\"` AIM: YcCopinICQ: 236931013
>   jgs |  |.  | \___/\___/
>   |  |.  |   ||
> 
> ---
> --
> Using Tomcat but need to do more? Need to support web services, 
> security?Get stuff done quickly with pre-integrated technology to 
> make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache 
> Geronimohttp://sel.as-
> us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] optimizes basemap rendering for tiles

2006-08-10 Thread Daniel Poelzleithner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I'm using django and basemap to render tiles i can use to make an
overlay on google maps. I'm using this to generate a topology of an open
mesh network (freifunk) here in leipzig :)
On my local developing machine this works very nice and due heavy
caching of database lookups it doesn't seem slow. My problem is, that
the production machine isn't that fast and has to little memory :(

Now I'm thinking of a better algorithm to generate the tiles. Currently
they are generated on demand and then saved to disc for later usage. But
the topology is fetched every 10 minutes, so the disc files timeout
relative fast.

my current algorithm looks like this:

fetch all node positions and cache them through pickle.
These are rendered as small blue dots on the map (Yes, here I can
optimize to only call plot when the node is in boundries of the tile.

then all connections for the last topo are fetched and cached.
Now there is a problem, I have to plot all connections into the plot,
because it's not easy to say which lines are actually in the tile. I
haven't looked deep into matplotlib to know how optimized it already
ignores plots which are out of bound.

Now I'm asking my self: is it possible to make a basemap instance with
some lat/lng borders, plot all stuff in it, and then move the borders to
get a new tile which is next to the last one ? Would such a algorithm be
faster then the current one ?

If not, there is also the posibility to create one large image at
largest zoomlevel for the most used region and then cut and scale the
image until all tiles are generated.

You can find the sourcecode at:
http://ff-firmware.quamquam.org/trac/browser/ffsomething/trunk/apps/uptime/topoimg.py
mktopo() is acutally doing the work :)

kindly regards
  Daniel
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: GnuPT 2.7.2
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE24sHy/mkIQp7AD0RApIIAJ9rixzc9B84H/rvkZi5WZHeNmLb0QCgnrzx
De40WjI3L2E4/rdOlorGO1M=
=6Fq9
-END PGP SIGNATURE-

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] optimizes basemap rendering for tiles

2006-08-10 Thread Jeff Whitaker
Daniel Poelzleithner wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> I'm using django and basemap to render tiles i can use to make an
> overlay on google maps. I'm using this to generate a topology of an open
> mesh network (freifunk) here in leipzig :)
> On my local developing machine this works very nice and due heavy
> caching of database lookups it doesn't seem slow. My problem is, that
> the production machine isn't that fast and has to little memory :(
>
> Now I'm thinking of a better algorithm to generate the tiles. Currently
> they are generated on demand and then saved to disc for later usage. But
> the topology is fetched every 10 minutes, so the disc files timeout
> relative fast.
>
> my current algorithm looks like this:
>
> fetch all node positions and cache them through pickle.
> These are rendered as small blue dots on the map (Yes, here I can
> optimize to only call plot when the node is in boundries of the tile.
>
> then all connections for the last topo are fetched and cached.
> Now there is a problem, I have to plot all connections into the plot,
> because it's not easy to say which lines are actually in the tile. I
> haven't looked deep into matplotlib to know how optimized it already
> ignores plots which are out of bound.
>
> Now I'm asking my self: is it possible to make a basemap instance with
> some lat/lng borders, plot all stuff in it, and then move the borders to
> get a new tile which is next to the last one ? Would such a algorithm be
> faster then the current one ?
>
> If not, there is also the posibility to create one large image at
> largest zoomlevel for the most used region and then cut and scale the
> image until all tiles are generated.
>
> You can find the sourcecode at:
> http://ff-firmware.quamquam.org/trac/browser/ffsomething/trunk/apps/uptime/topoimg.py
> mktopo() is acutally doing the work :)
>
> kindly regards
>   Daniel
>   

Daniel:  If you know what the lat/lon boundaries of all the tiles are 
beforehand, you can create Basemap instances for all those tiles once, 
then save them to pickles and have the app just load those pickles on 
demand.  That way you will avoid the overhead of creating the Basemap 
instances, which can be significant, especially when higher resolution 
boundaries are used (since all of those boundaries have to be 
transformed from geographic to projection coordinates when the instance 
is created).

-Jeff

-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : [EMAIL PROTECTED]
325 BroadwayOffice : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] wxmsw26uh_vc.dll and matplotlib 0.87

2006-08-10 Thread Daniel McQuillen

Werner,

Thanks for your work in solving this problem. I'm experiencing the same trouble.
I can compile to .exe if I exclude wxmsw26uh_vc.dll, but then when I run my
final .exe, I get a error dialog popup and the program won't run.

The dialog says "The procedure entry point [EMAIL PROTECTED]@@UBEHXZ
could not be located in the dynamic link library wxmsw26uh_vc.dll"

Did you experience this problem after compiling with 
an excluded wxmsw26uh_vc.dll?

BTW, I'm working with Python 2.4, the unicode verison of wxPython,
and windows XP.

With Regards,

Daniel McQuillen



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Changing symbols on the fly

2006-08-10 Thread David Grant
I have a look like this:    for i,_ in enumerate(myRunObject.results[0]):    pylab.plot(x, counts[i])That will plot a bunch of curves and I would like the point style to change as well as the colour (which changes automatically). Is there a nice way to do this? The only idea I had was to make a list of the possible point styles that I like and grab a point style from that list according to the index = mod(i, len(listOfPointStyles))
-- David Granthttp://www.davidgrant.ca
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users