110110
111111
112112"""
113- temporal_cross_section(dates, obs; ylabel=nothing, period::Function=month )
113+ temporal_cross_section(dates, obs; ylabel=nothing, period::Function=monthday )
114114
115115Provides indication of temporal variation and uncertainty across time, grouped by `period`.
116116
@@ -125,7 +125,7 @@ Filters out leap days.
125125- `period::Function` : Method from `Dates` package to group (defaults to `monthday`)
126126"""
127127function temporal_cross_section (dates, obs;
128- title= " " , ylabel= " Median Error " , label= nothing ,
128+ title= " " , ylabel= " ME " , label= nothing ,
129129 period:: Function = monthday,
130130 kwargs... ) # show_extremes::Bool=false,
131131 if isnothing (label)
@@ -153,6 +153,8 @@ function temporal_cross_section(dates, obs;
153153 else
154154 target = xsect_res. cross_section
155155 end
156+ else
157+ target = xsect_res. cross_section
156158 end
157159
158160 x_section = target. median
@@ -171,10 +173,8 @@ function temporal_cross_section(dates, obs;
171173 delete! (kwargs, :yaxis )
172174 end
173175
174- xsect_df = xsect_res. cross_section
175-
176176 # Display indicator values using original data instead of log-transformed data
177- med = xsect_df . median
177+ med = xsect_res . cross_section . median
178178 m_ind = round (mean (med), digits= 2 )
179179 sd_ind = round (std (med), digits= 2 )
180180
@@ -186,7 +186,7 @@ function temporal_cross_section(dates, obs;
186186 fig = plot (xlabels, lower_95, fillrange= upper_95, color= " lightblue" , alpha= 0.3 , label= " CI₉₅ μ: $(wr95_m_ind) , σ: $(wr95_sd_ind) " , linealpha= 0 )
187187 plot! (fig, xlabels, lower_75, fillrange= upper_75, color= " lightblue" , alpha= 0.5 , label= " CI₇₅ μ: $(wr75_m_ind) , σ: $(wr75_sd_ind) " , linealpha= 0 )
188188 plot! (fig, xlabels, x_section,
189- label= " $(label) μ: $(m_ind) , σ: $(sd_ind) " ,
189+ label= " Median of $(label) μ: $(m_ind) , σ: $(sd_ind) " ,
190190 color= " black" ,
191191 xlabel= nameof (period),
192192 ylabel= ylabel,
0 commit comments