Violin plot#

A violin plot shows the distribution shape of a numeric variable grouped by categories.

gufo.chart(df).violin("department", "salary").show()

Horizontal#

gufo.chart(df).violin("department", "salary", horizontal=True).show()

Color#

# Single color for all violins
gufo.chart(df).violin("department", "salary", color="steelblue").show()

Wide-form#

Pass a list of column names to show one violin per column — no reshaping needed.

gufo.chart(df).violin("x", ["q1_scores", "q2_scores", "q3_scores"]).show()

API reference#

See gufo.core.chart.Chart.violin().