# first ten features data_dia = y data = x # standardization data_n_2 = (data - data.mean()) / (data.std()) # joinig the data with target variable data = pd.concat([y,data_n_2.iloc[:,0:10]],axis=1) # id_vars is the data we want to keep intact data = pd.melt(data,id_vars="diagnosis",var_name="features",value_name='value') fig = plt.figure() ax = fig.add_axes([.1,.1,2,1]) sns.violinplot(x="features", y="value", hue="diagnosis", data=data,split=True, inner="quart") plt.xticks(rotation=90) plt.show()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter