Python 我的20行线图中每条线的不同线型/标记

Python 我的20行线图中每条线的不同线型/标记,python,matplotlib,cluster-analysis,Python,Matplotlib,Cluster Analysis,我试图为我的绘图中的每一行使用不同的线条样式或标记,以使绘图更具视觉吸引力,我尝试使用(hsv)提供不同的颜色,但颜色仍然彼此接近,这使我无法区分线条,以下是我的代码: plt.figure(figsize=(15,15)) import matplotlib.colors as colors i=1 for cluster_index in [0,1,2]: plt.subplot(3,1,cluster_index + 1) for index, row in data

我试图为我的绘图中的每一行使用不同的线条样式或标记,以使绘图更具视觉吸引力,我尝试使用(hsv)提供不同的颜色,但颜色仍然彼此接近,这使我无法区分线条,以下是我的代码:

plt.figure(figsize=(15,15))
import matplotlib.colors as colors
i=1
for cluster_index in [0,1,2]:

    plt.subplot(3,1,cluster_index + 1)


    for index, row in data_consumption2.iterrows():

        if row.iloc[-1] == cluster_index:
            hsv = ((1/25)*i, 0.2+ (i%2)/2,.8)
            plt.plot(row.iloc[1:-1] , color =colors.hsv_to_rgb(hsv) ,marker='v', alpha=1)
            i+=1

        plt.legend(loc="best")


    plt.plot(kmeans.cluster_centers_[cluster_index], color='k' ,marker='o', alpha=1)

    plt.xticks(rotation='vertical')
    plt.ylabel('Electricity Consumption')
    plt.title(f'Cluster {cluster_index}', fontsize=20)

plt.tight_layout()
plt.show()
在第二个集群中,我有25条不同的线条,我希望有人能给我一些技巧,让我在for循环的每个迭代中改变线条样式