I’m trying to make this ridgeplot chart in plotly and its mostly working ok, but for some reason the top trace is getting cut off and i can’t figure out how to move the trace down a bit. I can do it manually by dragging the axis
the code i have
for i, time_unit in enumerate(time_units):
fig = go.Figure()
df_year = df[df['year'] == time_unit]
months = sorted(df['month'].unique())
for j, month in enumerate(months):
df_month = df_year[df_year['month'] == month]
fig.add_trace(go.Violin(
x=df_month['metric_value'],
name=calendar.month_name[month],
side='negative',
box_visible=False
))
fig.update_layout(
title=f'Ridge Plot for Year {time_unit}',
xaxis_title='Metric Value',
yaxis_title='Month',
yaxis=dict(automargin=True, domain=[0.00, 0.00], autorange='reversed',),
violingap=0,
violingroupgap=0,
violinmode='overlay',
height=1200
)
fig.show()
this is the goal