plotting collections on an X date axes

Simson Garfinkel wrote:

Simson Garfinkel wrote:

Hi. It's me again, asking about dates again.
is there any easy way to a collection using dates on the X axes? I've taken the collection example from the website and adopted it so that there is a use_dates flag. Set it to False and spirals demo appears. Set it to True and I get this error:

Yes, it looks like a bug in the handling of units in the Collection base class; unit conversion is done at drawing time, but needs either to be done earlier, or to be done independently in the get_datalim method.

Maybe one of the units-support experts will pick this up and fix it. I can't do more now.

Hi, Eric.

Ah. Just my luck. I always push this stuff in new and unexpected ways.

Here's what I'm trying to do --- I want to plot a graph of circles where the size of the circle and color are determined by the data, where the X axis is year/month/day, and the Y axis is just day. (So a lot of "1" values would be a lot of slightly diagonal lines.)

Any idea how to do this within the current matplotlib, or should I just hack it by hand?

Simson,

The scatter function or Axes method is designed for exactly this, but units support was broken in two places. I have fixed it in 6781 on the 98.5 maintenance branch, merged to the trunk in 6782. So, please update to one of these and try scatter(). (Watch out for the odd definition of the "s" kwarg for size: area in points squared.)

Eric

···

On Jan 12, 2009, at 11:53 AM, Eric Firing wrote:

Thanks.

Hi, Eric.
Ah. Just my luck. I always push this stuff in new and unexpected ways.
Here's what I'm trying to do --- I want to plot a graph of circles where the size of the circle and color are determined by the data, where the X axis is year/month/day, and the Y axis is just day. (So a lot of "1" values would be a lot of slightly diagonal lines.)
Any idea how to do this within the current matplotlib, or should I just hack it by hand?

Simson,

The scatter function or Axes method is designed for exactly this, but units support was broken in two places. I have fixed it in 6781 on the 98.5 maintenance branch, merged to the trunk in 6782. So, please update to one of these and try scatter(). (Watch out for the odd definition of the "s" kwarg for size: area in points squared.)

Eric

Hm. So this means I need to switch from the .tar.gz releases to the subversion releases?

···

Thanks.

Simson Garfinkel wrote:

Hi, Eric.
Ah. Just my luck. I always push this stuff in new and unexpected ways.
Here's what I'm trying to do --- I want to plot a graph of circles where the size of the circle and color are determined by the data, where the X axis is year/month/day, and the Y axis is just day. (So a lot of "1" values would be a lot of slightly diagonal lines.)
Any idea how to do this within the current matplotlib, or should I just hack it by hand?

Simson,

The scatter function or Axes method is designed for exactly this, but units support was broken in two places. I have fixed it in 6781 on the 98.5 maintenance branch, merged to the trunk in 6782. So, please update to one of these and try scatter(). (Watch out for the odd definition of the "s" kwarg for size: area in points squared.)

Eric

Hm. So this means I need to switch from the .tar.gz releases to the subversion releases?

Yes. I don't know when a release will be made from the 98.5 maintenance branch.

Eric

Simson Garfinkel wrote:

Hi, Eric.
Ah. Just my luck. I always push this stuff in new and unexpected ways.
Here's what I'm trying to do --- I want to plot a graph of circles where the size of the circle and color are determined by the data, where the X axis is year/month/day, and the Y axis is just day. (So a lot of "1" values would be a lot of slightly diagonal lines.)
Any idea how to do this within the current matplotlib, or should I just hack it by hand?

Simson,

The scatter function or Axes method is designed for exactly this, but units support was broken in two places. I have fixed it in 6781 on the 98.5 maintenance branch, merged to the trunk in 6782. So, please update to one of these and try scatter(). (Watch out for the odd definition of the "s" kwarg for size: area in points squared.)

Eric

Hm. So this means I need to switch from the .tar.gz releases to the subversion releases?

You could try

ftp://currents.soest.hawaii.edu/pub/outgoing/matplotlib-0.98.6svn.tar.gz

which I made from my svn trunk checkout using "python setup.py sdist".

No guarantees. It is huge; it must have a lot of files that are not in the standard *.tar.gz.

I won't leave it there for more than a day or two, so if you want to try it, grab it now.

We would like to have buildbots making and posting daily svn packages, but we aren't there yet.

Eric

···

Thanks.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options