colorcycles and empty data

Just had a thought and I am curious about what others think.

Now that we have agreed that calling a plotting function with empty data should always be considered valid, should it also automatically advance the colorcycle? I think it should.

Here is a use-case: consider a user who is plotting temperature in three regions over time in one subplot, and surface pressure over time for those same three regions. Let’s say the thermometer in second region started reporting only NaNs. If empty data did not advance the color cycle, then the line for the temperature plot of the third region will be same as the line for the pressure plot for the second region, leading to mis-leading interpretation that the thermometer in the third region was the one that broke.

This is a really simple example, but I can see this being harder to ensure for more complicated plots the depend on the automatic color cycling.

Ben Root

Just had a thought and I am curious about what others think.

Now that we have agreed that calling a plotting function with empty data
should always be considered valid, should it also automatically advance
the colorcycle? I think it should.

I agree. Fortunately, that is the present behavior, at least with this simple test:

plot([1,2,3])
plot(, )
plot([3,2,1])

Eric

···

On 04/01/2011 10:47 AM, Benjamin Root wrote:

Here is a use-case: consider a user who is plotting temperature in three
regions over time in one subplot, and surface pressure over time for
those same three regions. Let's say the thermometer in second region
started reporting only NaNs. If empty data did not advance the color
cycle, then the line for the temperature plot of the third region will
be same as the line for the pressure plot for the second region, leading
to mis-leading interpretation that the thermometer in the third region
was the one that broke.

This is a really simple example, but I can see this being harder to
ensure for more complicated plots the depend on the automatic color cycling.

Ben Root

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf

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

Ok, good to know that someone else agrees. Enforcing this would probably best be done through tests that explicitly tests for this in a variety of different kinds of plots. Looks like yet another thing to add to my todo list when I finish my current “distraction”.

Ben Root

···

On Fri, Apr 1, 2011 at 4:46 PM, Eric Firing <efiring@…706…29…> wrote:

On 04/01/2011 10:47 AM, Benjamin Root wrote:

Just had a thought and I am curious about what others think.

Now that we have agreed that calling a plotting function with empty data

should always be considered valid, should it also automatically advance

the colorcycle? I think it should.

I agree. Fortunately, that is the present behavior, at least with this

simple test:

plot([1,2,3])

plot(, )

plot([3,2,1])

Eric