>
> How can I automatically cycle through distinctive line markers?
>>
>> I want a semilog plot, composed of a number of lines.  Each line should
>> have
>> a different color and marker.
>
>
I simply use:

colors = ['b', 'r', 'c', 'm', 'k', 'g', 'y']
symbols = ['-', '--', '-.', ':']
nc = len(colors)
ns = len(symbols)
cs = 0
cc = 0
for i in numpy.arange(len(parameters_list)):
    plt.plot(x, y, colors[cc%nc] + symbols[cs%ns], label=r'$\Delta x_{min} =
' + str(dxmin[j]) + ', N = ' + str(Ns[i]) + r'$')
    cc += 1
    if (cc == nc):
        cc = 0
        cs += 1

This will cycle through symbols when colors run out. You can indent or not
"cs" to cycle through symbols too.
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to