Can I update symbol positions and colors in a collection?

I have scatterplots on several axes that are dynamically updated, and
thus I need to keep track of each of the PolyCollection artists that
represent the scattered data. I would like to keep the same
PolyCollection object but update the positions, colors, etc. of the
symbols, possibly changing their total number, something along the
lines of Line.set_data.

Did I miss a method that would do what I want?

I have already looked at removing the collection from the axes and
replotting, but for some reason my axis limits get reset when I do so.

Thanks,
Eric

Eric Bruning wrote:

I have scatterplots on several axes that are dynamically updated, and
thus I need to keep track of each of the PolyCollection artists that
represent the scattered data. I would like to keep the same
PolyCollection object but update the positions, colors, etc. of the
symbols, possibly changing their total number, something along the
lines of Line.set_data.

Did I miss a method that would do what I want?

I have already looked at removing the collection from the axes and
replotting, but for some reason my axis limits get reset when I do so.

Guys,

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?

Ryan

···

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

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

Thanks,
JDH

···

On Thu, Jul 17, 2008 at 10:28 PM, Ryan May <rmay31@...287...> 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?