[Matplotlib-users] Can I update symbol positions and colors in a collection?

John Hunter wrote:

collections_offsets.diff (1.18 KB)

···

On Thu, Jul 17, 2008 at 10:28 PM, Ryan May <rmay31@...149...> wrote:

I helped Eric out with this offline, and obviously set_array is for the
colors, but the only solution we could come up with was to directly
reset the PolyCollection._offsets member. This seems a little hacky.
Is there any reason that there is not an set_offsets() (or something
like it)? Any reason why I shouldn't code up a patch?

No, I can't thing of any reason why this attribute should not be
publicly settable, so patch away.

Here's an updated version of the patch so that the doctring actually makes sense.

Ryan

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

Ryan,

Thanks. I will take care of this one way or another, but I want to see whether we really need both _uniform_offsets and _offsets.

Eric

Ryan May wrote:

···

John Hunter wrote:

On Thu, Jul 17, 2008 at 10:28 PM, Ryan May <rmay31@...149...> wrote:

I helped Eric out with this offline, and obviously set_array is for the
colors, but the only solution we could come up with was to directly
reset the PolyCollection._offsets member. This seems a little hacky.
Is there any reason that there is not an set_offsets() (or something
like it)? Any reason why I shouldn't code up a patch?

No, I can't thing of any reason why this attribute should not be
publicly settable, so patch away.

Here's an updated version of the patch so that the doctring actually makes sense.

Ryan

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

------------------------------------------------------------------------

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

Thanks for the help, Ryan and Eric.

···

On Sat, Jul 19, 2008 at 7:27 PM, Eric Firing <efiring@...229...> wrote:

Ryan,

Thanks. I will take care of this one way or another, but I want to see
whether we really need both _uniform_offsets and _offsets.

Eric

Ryan May wrote:

John Hunter wrote:

On Thu, Jul 17, 2008 at 10:28 PM, Ryan May <rmay31@...149...> wrote:

I helped Eric out with this offline, and obviously set_array is for the
colors, but the only solution we could come up with was to directly
reset the PolyCollection._offsets member. This seems a little hacky.
Is there any reason that there is not an set_offsets() (or something
like it)? Any reason why I shouldn't code up a patch?

No, I can't thing of any reason why this attribute should not be
publicly settable, so patch away.

Here's an updated version of the patch so that the doctring actually
makes sense.

Ryan