From c3230e4615783db23d05ef25a907a9ec7f92d96d Mon Sep 17 00:00:00 2001 From: Marcel Weschke Date: Thu, 31 Jul 2025 13:47:31 +0200 Subject: [PATCH] updated plot margins, improving arragements. --- app.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index 76aac4c..66095c3 100644 --- a/app.py +++ b/app.py @@ -248,14 +248,14 @@ def create_elevation_plot(df): fig = go.Figure(data=traces) fig.update_layout( - title='Höhenprofil relativ zum Startwert', + title=dict(text='Höhenprofil relativ zum Startwert', font=dict(size=16)), xaxis_title='Zeit', yaxis_title='Höhe relativ zum Start (m)', template='plotly_dark', paper_bgcolor='#1e1e1e', plot_bgcolor='#111111', font=dict(color='white'), - margin=dict(l=40, r=20, t=50, b=40), + margin=dict(l=40, r=40, t=50, b=40), height=500 ) return fig @@ -273,7 +273,6 @@ def create_deviation_plot(df): #Distanz-Zeit-Diagramm df, x='time_loc', y='del_dist_km_qmean', - title='Abweichung von integrierter Durchschnittsgeschwindigkeit', labels={ 'time_loc': 'Zeit', 'del_dist_km_qmean': 'Δ Strecke (km)' @@ -281,6 +280,7 @@ def create_deviation_plot(df): #Distanz-Zeit-Diagramm template='plotly_dark', ) fig.update_layout( + title=dict(text='Abweichung von integrierter Durchschnittsgeschwindigkeit', font=dict(size=16)), yaxis_title='Abweichung (km)', xaxis_title='Zeit', height=400, @@ -314,7 +314,7 @@ def create_speed_plot(df): line=dict(color='royalblue') )) fig.update_layout( - title=f'Geschwindigkeit über die Zeit (geglättet) (∅: {mean_speed_kmh:.2f} km/h)', + title=dict(text=f'Geschwindigkeit über die Zeit (geglättet) (∅: {mean_speed_kmh:.2f} km/h)', font=dict(size=16)), xaxis=dict(title='Zeit', tickformat='%H:%M', type='date'), yaxis=dict(title='Geschwindigkeit (km/h)', rangemode='tozero'), template='plotly_dark', @@ -380,7 +380,7 @@ def create_pace_bars_plot(df): )) fig.update_layout( - title='Pace (min/km) je Kilometer', + title=dict(text='Pace (min/km) je Kilometer', font=dict(size=16)), xaxis_title='Distanz (km)', yaxis_title='Minuten pro km', barmode='overlay', @@ -395,7 +395,7 @@ def create_pace_bars_plot(df): ), template='plotly_dark', height=400, - margin=dict(l=40, r=20, t=20, b=40), + margin=dict(l=40, r=40, t=30, b=40), plot_bgcolor='#111111', paper_bgcolor='#1e1e1e', font=dict(color='white')