The question of setting the color and line style sequences comes up every now and then, and although there are neat solutions like Fernando demonstrated, perhaps we should add support for them to matplotlib. The Matlab interface seems to be like this:
>> figure >> >> set(gca, 'LineStyleOrder', '-o|-x|-^') % sequence of three line styles >> >> set(gca, 'ColorOrder', [1 0 0; 0 0 1]) % sequence of two colors (red and >> blue) >> set(gca, 'NextPlot', 'replacechildren') % don't reset the properties I just >> set >> plot(random(6)) This plots six lines with different combinations of style and color; the seventh line would look the same as the first. Probably you can avoid the NextPlot thing by setting DefaultLineStyleOrder on the root handle, but never mind. So, to make the interface familiar to Matlab users, I suggest to add properties line.linestyleorder and line.colororder that can take any sequences of linestyles and colors, or an n-by-3 array of rgb color values for the latter. I think the |-separated linestyles spec is a hack (necessary in Matlab because it cannot have vectors of strings because of the auto-flattening matrices) that we shouldn't emulate. How does that sound? -- Jouni K. Seppänen http://www.iki.fi/jks ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users