Charts used to visualize the distribution of multiple groups and their differences. Since the chart of distribution is superimposed, it is easy to visualize slight differences in distribution and differences/changes in the position of the vertices for each group.
importnumpyasnpimportseabornassnsfromridgeplotimportridgeplot# List of columns to be visualizedcolumns=["sepal_length","sepal_width","petal_length","petal_width"]# Sample datadf=sns.load_dataset("iris")df=df[columns]# ridgeline plotfig=ridgeplot(samples=df.values.T,labels=columns,colorscale="viridis",coloralpha=0.6)fig.update_layout(height=500,width=800)fig.show()
!
Violin Plot — Show distribution shape with box plot + KDE
Density Plot — Visualize distribution with a smooth curve
Box Plot — Compare median, quartiles, and outliers
Density Plot — understanding this concept first will make learning smoother