Hi John,
Here is a simple way to do it.
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(111)
colors = ('red','green','blue','yellow','orange')
linestyles = ('-','--',':')
linewidths = (0.5,2)
y = np.random.randn(100,30)
x = range(y.shape[0])
i = 0
for c in colors:
for ls in linestyles:
for lw in linewidths:
ax.plot(x,y[:,i],c=c,ls=ls,lw=lw)
i+=1
plt.show()
On 10-08-23 03:06 PM, John Salvatier wrote:
Hello,
I have a plot with lots of curves on it (say 30), and I would like to
have some way of distinguishing the curves from each other. Just
plotting them works well for a few curves because they come out as
different colors unless you specify otherwise, but if you do too many
you start getting repeats is there a way to have matplotlib also vary
the line style that it automatically assigns? Or perhaps someone has
another way of distinguishing lots of curves?
Best Regards,
John
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users