Skip to content

Commit cf2b4a0

Browse files
author
Fabian Bernhard
committed
feat: Make PlotAmounts more flexible
1 parent 7cfd1a8 commit cf2b4a0

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/func_postprocess.jl

+4-13
Original file line numberDiff line numberDiff line change
@@ -163,21 +163,12 @@ The user can override this with the second argument isotope as one of `:abovegro
163163
if (compartments == :belowground || compartments == :above_and_belowground)
164164
@series begin
165165
title := "Belowground"
166-
labels := ["total SWAT"]
166+
labels := ["total SWAT" reduce(hcat, horizon_labels)]
167167
ylab := "Amount [mm]"
168168
seriestype := :line
169169
subplot := 3
170170
# and other arguments:
171-
x, [col_sumSWATI_amt]
172-
end
173-
@series begin
174-
title := "Belowground"
175-
labels := reduce(hcat, horizon_labels)
176-
ylab := "Amount [mm]"
177-
seriestype := :line
178-
subplot := 3
179-
# and other arguments:
180-
x, reduce(hcat, cols_sumSWATIperLayer_amt)
171+
x, hcat(col_sumSWATI_amt[:], reduce(hcat, cols_sumSWATIperLayer_amt))
181172
end
182173

183174
@series begin
@@ -459,7 +450,7 @@ The user can override this with the second argument isotope as one of `:d18O`, `
459450
# ts_PREC_δ2H = ...
460451
if (isotope == :d18O || isotope == :d18O_and_d2H)
461452
@series begin # ts_PREC_δ18O
462-
title := "δ18O"
453+
title --> "δ18O"
463454
seriestype := :bar
464455
# linecolor := :match
465456
line_z := reshape(row_PREC_d18O,1,:)
@@ -477,7 +468,7 @@ The user can override this with the second argument isotope as one of `:d18O`, `
477468
end
478469
if (isotope == :d2H || isotope == :d18O_and_d2H)
479470
@series begin # ts_PREC_δ2H
480-
title := "δ2H"
471+
title --> "δ2H"
481472
seriestype := :bar
482473
# linecolor := :match
483474
line_z := reshape(row_PREC_d2H,1,:)

0 commit comments

Comments
 (0)