Skip to content

Commit

Permalink
Refactor viz/scenarios.jl to follow styleguide
Browse files Browse the repository at this point in the history
  • Loading branch information
Zapiano committed Oct 22, 2024
1 parent 6ed463f commit 57a9d9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/AvizExt/viz/scenarios.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function ADRIA.viz.scenarios!(
xtick_rot = get(axis_opts, :xticklabelrotation, 2 / π)
ax = Axis(g[1, 1]; xticks=xtick_vals, xticklabelrotation=xtick_rot, axis_opts...)

_scenarios = copy(scenarios[1:end .∈ [outcomes.scenarios], :])
_scenarios = copy(scenarios[1:end.∈[outcomes.scenarios], :])
scen_groups = if get(opts, :by_RCP, false)
ADRIA.analysis.scenario_rcps(_scenarios)
else
Expand Down Expand Up @@ -198,7 +198,7 @@ function _confints(
agg_dim = symdiff(axes_names(outcomes), [:timesteps])[1]
for (idx, group) in enumerate(group_names)
confints[:, idx, :] = series_confint(
outcomes[:, scen_groups[group]]; agg_dim=agg_dim
outcomes.data[:, scen_groups[group]]; agg_dim=agg_dim
)
end

Expand Down Expand Up @@ -327,7 +327,7 @@ function _sort_keys(
!isempty(default_names) && return default_names

default_keys = [:counterfactual, :unguided, :guided]
return default_keys[default_keys .∈ [scen_types]]
return default_keys[default_keys.∈[scen_types]]
elseif by == :variance
msg = "When sorting by variance, optional parameter `outcomes` must be provided"
isempty(outcomes) && throw(ArgumentError(msg))
Expand Down

0 comments on commit 57a9d9d

Please sign in to comment.