I am trying to plot scatterplot using matplotlib: I am using the below code to plot for multiple features
columns = df_filtered.columns
font = {'family' : 'normal',
'weight' : 'bold',
'size' : 8}
color_map={0:'b',1:'r',2:'g',3:'c',4:'y',5:'m',6:'k',7:'grey',8:'tan',9:'orange',10:'seagreen',11:'royalblue',12:'darkgrey',13:'teal'}
label_color=[color_map[l] for l in df_filtered['test_label']]
marker_map = {12:'o',15:'*'}
label_marker = [marker_map[i] for i in df_filtered['DOE-id']]
for column in columns:
print(column)
plt.figure(figsize=(15,7))
plt.scatter(df_filtered['Time'],df_filtered[column],c=label_color,marker=label_marker)
plt.tight_layout()
plt.ylabel(column,fontsize=20)
plt.title(column,fontsize=8)
plt.rc('font', **font)
plt.savefig(str(column)+'.png',bbox_inches="tight")
plt.show()
But i am getting the error:-
ValueError: Unrecognized marker style ['*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', '*', 'o', 'o', 'o', 'o', 'o', 'o', '*', 'o', 'o', 'o',, ...... etc..
I want to color the scatters using 'test_label' column and get different shapes for the scatters using 'DOE-id' column. I think the approach I have taken for marking the scatters is wrong.
Any idea on how to get this?