Wind Barbs

Ok,

I've committed my wind barbs stuff in SVN. Anyone interested, go ahead an hammer on it.

Should I post this over on matplotlib-users, or does experience show that the SVN crowd all read here? (This is what you get for having a n00b developer :slight_smile: )

Jeff, does a method need to be added to Basemap? If so, will you handle it or should it?

Ryan

路路路

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Ryan May wrote:

Ok,

I've committed my wind barbs stuff in SVN. Anyone interested, go ahead an hammer on it.

Should I post this over on matplotlib-users, or does experience show that the SVN crowd all read here? (This is what you get for having a n00b developer :slight_smile: )

We routinely encourage anyone who uses svn to follow this list, but who knows? I don't think it would hurt to advertise it and see if there are any other meteorologists lurking out there who want to help check it out.

Eric

路路路

Jeff, does a method need to be added to Basemap? If so, will you handle it or should it?

Ryan

Ryan May wrote:

Ok,

I've committed my wind barbs stuff in SVN. Anyone interested, go ahead an hammer on it.

Very nice!

Comments on the example, barb_demo.py:

1) In your third panel, you put the args after the kwargs. I had no idea this was even legal--it's the first time I have seen it. It's probably better to stick with conventional usage so as not to distract the reader from the point, which is how to use the barb function.

2) In a similar vein, I would suggest sticking with explicit X, Y, U, V arguments. Your (*zip(*data)) is an obfuscation.

3) It would be better to use non-square asymmetric arrays so as to make it clear which point in the data array corresponds to which point on the plot. An example with NxN arrays doesn't help illustrate the relation between the array and the plot locations.

Eric

Eric Firing wrote:

Ryan May wrote:

Ok,

I've committed my wind barbs stuff in SVN. Anyone interested, go ahead an hammer on it.

Very nice!

Comments on the example, barb_demo.py:

1) In your third panel, you put the args after the kwargs. I had no idea this was even legal--it's the first time I have seen it. It's probably better to stick with conventional usage so as not to distract the reader from the point, which is how to use the barb function.

Magic! I don't know either. It's one of those things you stick in during development for expediency.

2) In a similar vein, I would suggest sticking with explicit X, Y, U, V arguments. Your (*zip(*data)) is an obfuscation.

Agreed.

3) It would be better to use non-square asymmetric arrays so as to make it clear which point in the data array corresponds to which point on the plot. An example with NxN arrays doesn't help illustrate the relation between the array and the plot locations.

Sure.
I was going to tweak the demo anyways to show off more of the available parameters, so all of this will fit in well with that. I'll try to squeeze that in tonight.

Ryan

路路路

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Eric Firing wrote:

Ryan May wrote:

Ok,

I've committed my wind barbs stuff in SVN. Anyone interested, go ahead an hammer on it.

Very nice!

Comments on the example, barb_demo.py:

1) In your third panel, you put the args after the kwargs. I had no idea this was even legal--it's the first time I have seen it. It's probably better to stick with conventional usage so as not to distract the reader from the point, which is how to use the barb function.

2) In a similar vein, I would suggest sticking with explicit X, Y, U, V arguments. Your (*zip(*data)) is an obfuscation.

3) It would be better to use non-square asymmetric arrays so as to make it clear which point in the data array corresponds to which point on the plot. An example with NxN arrays doesn't help illustrate the relation between the array and the plot locations.

Ok, I checked in some changes that should address all of those, plus provide a more comprehensive demonstration of capabilities. Thanks for the feedback.

I also got rid of the windows line endings (sorry). Usually not a problem, but I've had a (temporary) "opportunity" to be using windows for some development.

Let me know if you see anything else.

Ryan

路路路

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma