"Ryan Krauss" <ryanlists@...287...> writes:
How do I change the default color order
The colors are hardwired in the pylab interface, but you can hack
gca()._get_lines.colors = ['#101050', '#105010', '#501010']
gca()._get_lines.Ncolors = 3
gca()._get_lines.firstColor = '#101050'
Support for this might be a useful addition to the pylab interface.
Does anyone know how to do this in Matlab?
and how do I set up a similar default linetype order, so that the
first call to plot generates a solid line and the second a dashed
one (for example).
I don't think there is support for this in pylab.
Of course, if all your plot calls just draw a single line, you can
cycle both the color and the line style easily by defining your own
my_colors = ['b','g','r']; my_styles = ['-', ':', '--']
my_c = 0; my_s = 0
def plot(x, y):
global my_colors, my_styles, my_c, my_s
pylab.plot(x, y, my_colors[my_c % len(my_colors)]
+ my_styles[my_s % len(my_styles)])
my_c += 1; my_s += 1
But if you want the full pylab.plot argument parsing functionality,
the easiest thing would probably be to implement this in