Example image update
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
19
fit_app.py
19
fit_app.py
@@ -665,17 +665,15 @@ def create_heart_rate_plot(df):
|
||||
# Heart Rate Zonen (optional)
|
||||
if mean_hr > 0:
|
||||
# Geschätzte maximale Herzfrequenz (Beispiel: 200 bpm)
|
||||
# Heart Rate Zonen (optional)
|
||||
# Geschätzte maximale Herzfrequenz
|
||||
max_hr_estimated = 200 # oder z. B. 220 - alter
|
||||
|
||||
# Definiere feste HR-Zonen in BPM
|
||||
zones = [
|
||||
{"name": "Zone 1", "lower": 0, "upper": 124, "color": "#F4A4A3"},
|
||||
{"name": "Zone 2", "lower": 124, "upper": 154, "color": "#EF7476"},
|
||||
{"name": "Zone 3", "lower": 154, "upper": 169, "color": "#EA4748"},
|
||||
{"name": "Zone 4", "lower": 169, "upper": 184, "color": "#E02628"},
|
||||
{"name": "Zone 5", "lower": 184, "upper": max_hr_estimated, "color": "#B71316"},
|
||||
{"name": "Zone 1", "lower": 0, "upper": 124, "color": "#F4A4A3"}, # Regeneration (Recovery)
|
||||
{"name": "Zone 2", "lower": 124, "upper": 154, "color": "#EF7476"}, # Grundlagenausdauer (Endurance)
|
||||
{"name": "Zone 3", "lower": 154, "upper": 169, "color": "#EA4748"}, # Tempo
|
||||
{"name": "Zone 4", "lower": 169, "upper": 184, "color": "#E02628"}, # Schwelle (Threshold)
|
||||
{"name": "Zone 5", "lower": 184, "upper": max_hr_estimated, "color": "#B71316"}, # Anaerob
|
||||
]
|
||||
|
||||
# Zeichne Zonen als Hintergrund (horizontale Rechtecke)
|
||||
@@ -683,7 +681,7 @@ def create_heart_rate_plot(df):
|
||||
fig.add_hrect(
|
||||
y0=zone["lower"], y1=zone["upper"],
|
||||
fillcolor=zone["color"],
|
||||
opacity=0.1,
|
||||
opacity=0.15,
|
||||
line_width=0,
|
||||
annotation_text=zone["name"], # optional: Name der Zone einblenden
|
||||
annotation_position="top left"
|
||||
@@ -771,8 +769,9 @@ def create_pace_bars_plot(df):
|
||||
y=df['pace_min_per_km'],
|
||||
width=df['segment_len'],
|
||||
text=[f"{v:.1f} min/km" if pd.notnull(v) else "" for v in df['pace_min_per_km']],
|
||||
textposition='outside',
|
||||
marker_color='dodgerblue',
|
||||
#textposition='outside',
|
||||
textposition='inside',
|
||||
marker_color='#125595',
|
||||
name='Pace pro km',
|
||||
offset=0
|
||||
))
|
||||
|
||||
@@ -427,8 +427,9 @@ def create_pace_bars_plot(df):
|
||||
y=df['pace_min_per_km'],
|
||||
width=df['segment_len'],
|
||||
text=[f"{v:.1f} min/km" if pd.notnull(v) else "" for v in df['pace_min_per_km']],
|
||||
textposition='outside',
|
||||
marker_color='dodgerblue',
|
||||
#textposition='outside',
|
||||
textposition='inside',
|
||||
marker_color='#125595',
|
||||
name='Pace pro km',
|
||||
offset=0
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user