Skip to content

Commit bc0f74d

Browse files
committed
if ss differs due to algoruthm dont use Plot index as column but Algorithm
1 parent 689abd4 commit bc0f74d

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

ext/StatsPlotsExt.jl

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,10 +1556,6 @@ function plot_irf!(𝓂::ℳ;
15561556

15571557
ppp = StatsPlots.plot(pp...; attributes...)
15581558

1559-
pushfirst!(annotate_ss_page, "Plot index" => 1:len_diff)
1560-
1561-
push!(annotate_ss, annotate_ss_page)
1562-
15631559
if haskey(diffdict, :model_name)
15641560
model_string = "multiple models"
15651561
else
@@ -1571,7 +1567,7 @@ function plot_irf!(𝓂::ℳ;
15711567
plot_elements = [ppp, legend_plot]
15721568

15731569
layout_heights = [15,1]
1574-
1570+
15751571
if length(annotate_diff_input) > 2
15761572
annotate_diff_input_plot = plot_df(annotate_diff_input)
15771573

@@ -1580,8 +1576,14 @@ function plot_irf!(𝓂::ℳ;
15801576
push!(plot_elements, ppp_input_diff)
15811577

15821578
push!(layout_heights, 5)
1579+
1580+
pushfirst!(annotate_ss_page, "Plot index" => 1:len_diff)
1581+
else
1582+
pushfirst!(annotate_ss_page, annotate_diff_input[2][1] => annotate_diff_input[2][2])
15831583
end
15841584

1585+
push!(annotate_ss, annotate_ss_page)
1586+
15851587
if length(annotate_ss[pane]) > 1
15861588
annotate_ss_plot = plot_df(annotate_ss[pane])
15871589

@@ -1636,10 +1638,6 @@ function plot_irf!(𝓂::ℳ;
16361638

16371639
ppp = StatsPlots.plot(pp...; attributes...)
16381640

1639-
pushfirst!(annotate_ss_page, "Plot index" => 1:len_diff)
1640-
1641-
push!(annotate_ss, annotate_ss_page)
1642-
16431641
if haskey(diffdict, :model_name)
16441642
model_string = "multiple models"
16451643
else
@@ -1660,8 +1658,14 @@ function plot_irf!(𝓂::ℳ;
16601658
push!(plot_elements, ppp_input_diff)
16611659

16621660
push!(layout_heights, 5)
1661+
1662+
pushfirst!(annotate_ss_page, "Plot index" => 1:len_diff)
1663+
else
1664+
pushfirst!(annotate_ss_page, annotate_diff_input[2][1] => annotate_diff_input[2][2])
16631665
end
16641666

1667+
push!(annotate_ss, annotate_ss_page)
1668+
16651669
if length(annotate_ss[pane]) > 1
16661670
annotate_ss_plot = plot_df(annotate_ss[pane])
16671671

0 commit comments

Comments
 (0)