I have the following seaborn violin plot:
sns.violinplot( x=c1_census['Cluster Labels'], y=c1_census['Land Area (km2)'],palette=my_pal)
plt.show()
How can I change the labels of the x-axis without going back and changing the data. For example:
Replacing 0 for A, 1 for B, 2 for C, 3 for D, 4 for E
Thanks in advance!
You can use ax.set_xticklabels
:
ax = sns.violinplot( x=c1_census['Cluster Labels'], y=c1_census['Land Area (km2)'],palette=my_pal)
ax.set_xticklabels([*'ABCDE'])