@@ -49,18 +49,31 @@ def main():
49
49
"--activities_path" , help = "Path to activities.csv from Strava bulk export zip"
50
50
)
51
51
parser .add_argument (
52
- "--year_min" , help = "The minimum year to use for the calendar heatmap."
52
+ "--year_min" ,
53
+ type = int ,
54
+ help = "The minimum year to use for the calendar heatmap and dumbbell." ,
53
55
)
54
56
parser .add_argument (
55
- "--year_max" , help = "The maximum year to use for the calendar heatmap."
57
+ "--year_max" ,
58
+ type = int ,
59
+ help = "The maximum year to use for the calendar heatmap and dumbbell." ,
56
60
)
57
61
parser .add_argument (
58
62
"--max_dist" ,
63
+ type = float ,
59
64
help = "Maximum daily distance for the calendar heatmap; "
60
65
"values above this will be capped." ,
61
66
)
62
- parser .add_argument ("--fig_height" , help = "Figure height for the calendar heatmap." )
63
- parser .add_argument ("--fig_width" , help = "Figure width for the calendar heatmap." )
67
+ parser .add_argument (
68
+ "--fig_height" ,
69
+ type = float ,
70
+ help = "Figure height for the calendar heatmap and dumbbell." ,
71
+ )
72
+ parser .add_argument (
73
+ "--fig_width" ,
74
+ type = float ,
75
+ help = "Figure width for the calendar heatmap and dumbbell." ,
76
+ )
64
77
parser .add_argument (
65
78
"--local_timezone" ,
66
79
help = "Timezone for determining local times for activities. "
@@ -134,12 +147,32 @@ def main():
134
147
if activities is not None :
135
148
print ("Plotting calendar..." )
136
149
outfile = f"{ args .output_prefix } -calendar.png"
137
- plot_calendar (activities , output_file = outfile )
150
+ fig_height = args .fig_height or 15
151
+ fig_width = args .fig_width or 9
152
+ plot_calendar (
153
+ activities ,
154
+ args .year_min ,
155
+ args .year_max ,
156
+ args .max_dist ,
157
+ fig_height ,
158
+ fig_width ,
159
+ outfile ,
160
+ )
138
161
print (f"Saved to { outfile } " )
139
162
140
163
print ("Plotting dumbbell..." )
141
164
outfile = f"{ args .output_prefix } -dumbbell.png"
142
- plot_dumbbell (activities , output_file = outfile )
165
+ fig_height = args .fig_height or 34
166
+ fig_width = args .fig_width or 34
167
+ plot_dumbbell (
168
+ activities ,
169
+ args .year_min ,
170
+ args .year_max ,
171
+ args .local_timezone ,
172
+ fig_height ,
173
+ fig_width ,
174
+ outfile ,
175
+ )
143
176
print (f"Saved to { outfile } " )
144
177
145
178
0 commit comments