Skip to content

Commit 570d436

Browse files
committed
fix: y-axi starts from zero
1 parent c509fd5 commit 570d436

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

dashboard/utils/training_plots.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def plot_single_metric(run, metric_key, title, ylabel, unit, smoothing, y_log):
7676

7777
if y_log:
7878
fig.update_yaxes(type="log")
79+
else:
80+
fig.update_yaxes(rangemode="tozero")
7981

8082
st.plotly_chart(fig, use_container_width=True)
8183

@@ -131,6 +133,8 @@ def plot_multi_metric_comparison(
131133

132134
if y_log:
133135
fig.update_yaxes(type="log")
136+
else:
137+
fig.update_yaxes(rangemode="tozero")
134138

135139
st.plotly_chart(fig, use_container_width=True)
136140

dashboard/utils/visualizations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ def plot_timeseries_auto(
350350
height=420,
351351
hovermode="x unified",
352352
)
353+
fig.update_yaxes(rangemode="tozero")
353354
if y_log_scale:
354355
fig.update_yaxes(type="log")
355356
return fig

0 commit comments

Comments
 (0)