Auto assign line styles, colors, markers

In gnuplot, as one plots multiple lines on the same graph, the default
behavior is that gnuplot automatically selects linestyle, colors and
markers. In matplotlib, the default behavior (if I don't specify
format etc) is to draw every line in solid style, no markers, blue
color. I much prefer gnuplot's default behavior -- is there some way
of configuring matplotlib to do the same?

Thanks,
Diwaker

···

--
Web/Blog/Gallery: http://floatingsun.net/blog

Re-sending one last time in case someone has any ideas.

···

============
In gnuplot, as one plots multiple lines on the same graph, the default
behavior is that gnuplot automatically selects linestyle, colors and
markers. In matplotlib, the default behavior (if I don't specify
format etc) is to draw every line in solid style, no markers, blue
color. I much prefer gnuplot's default behavior -- is there some way
of configuring matplotlib to do the same?

Thanks,
Diwaker
--
Web/Blog/Gallery: http://floatingsun.net/blog

Diwaker Gupta wrote:

Re-sending one last time in case someone has any ideas.

============
In gnuplot, as one plots multiple lines on the same graph, the default
behavior is that gnuplot automatically selects linestyle, colors and
markers. In matplotlib, the default behavior (if I don't specify
format etc) is to draw every line in solid style, no markers, blue
color. I much prefer gnuplot's default behavior -- is there some way
of configuring matplotlib to do the same?

Thanks,
Diwaker

The short answer is no, this is not configurable. You can get somewhat the same effect with some programming. Here is a minimal illustration in ipython, using the attached module:

In [1]:from cycle_markers import cplot

In [2]:x = arange(0,10, 0.1)

In [3]:y1 = sin(x)

In [4]:y2 = cos(x)

In [5]:cplot(x, y1, x, y2)

If you want to be able to call cplot repeatedly and get the next color/marker combination in the cycle each time, you could use a generator instead of the simple markers list.

Eric

cycle_markers.py (326 Bytes)