[SciPy-dev] Extra marker in X-Y plot

eric eric at scipy.org
Fri Nov 9 10:26:37 CST 2001

Hey Magnus,

> Silly me, thanks. I completely missed the following
> format in the plotting tutorial:
> plot(x1, format_string, x2, y2, x3, y3, format_string3, .)
> (But where did y1 go?)

plot searches through its arguments for "line groups".  A line group
can be:
    y1, 'format_string'

When format strings are present in line group, the interpretation of the
groups is unambigous -- the format string always comes at the end of a line
group.  In cases where format strings aren't present, there are some
cases.  FOr example:


could be interpreted as a single line with x1=a  y1=b with b vs. a type plot
as two lines with y1=a and y2 = b with each line plotted vs. its array
plt will always choose the x1=a  y1=b interpretation in these cases.  I
you could say that line groups are greedy.  So


will plot b vs a and c vs. its indices.


will plot a blue line for a vs. indices and c vs b using a default color.


will plot a blue line for a vs. indices and c vs b using a default color and
d vs its indices using red plus marks.

Hope that isn't too confusing.  The good news is that this approach
results in the expected behavior.

see ya,

> I'll claim it was because the example used the same x values
> for both curves, so when I looked at the image, I draw the
> conclusion that all descriptions in the tutorial used only
> one x-values for all curves in a plot...
> I should read better.
> Thanks again,
> Magnus
> --
> Magnus Lyckå, Thinkware AB
> Älvans väg 99, SE-907 50 UMEÅ
> tel 070-582 80 65, fax: 070-612 80 65
> http://www.thinkware.se/  mailto:magnus at thinkware.se
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-dev

More information about the Scipy-dev mailing list