Skip to content

Commit d5cb819

Browse files
committed
minor figure changes
restrict sizes to journal relevant ones sim timings figures to use x axis labels instead of legend
1 parent 767051f commit d5cb819

File tree

5 files changed

+22
-19
lines changed

5 files changed

+22
-19
lines changed

diagrams.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ plot!(x, y, label="Standard", color=:red, arrow=true, legend=:bottomright; plotP
9494
# Initial Condition
9595
plotB = hline!([initialCondition], label="IC", color=:pink; plotParams...)
9696

97-
plot(plotA, plotB, layout=l, size=(539,250), dpi=300, left_margin=4Plots.mm,
97+
plot(plotA, plotB, layout=l, size=(539,250), dpi=300, left_margin=4Plots.mm,
9898
title=["A" "B"], titlelocation=:left)
9999
savefig("results/diagrams/possibleProblems.pdf")
100100

@@ -217,7 +217,7 @@ xformatter=x -> x * 1000, legend=false; plotParams...)
217217
p2t = twinx()
218218
plot!(p2t, sol, idxs=[6], label=nothing, xlabel="", ylabel="K Concentration", color=:red, legend=false; plotParams...)
219219
plot!(p2, [NaN], [NaN], label="K", color=:red; plotParams...)
220-
plot!(p2, legend=:best)
220+
plot!(p2, legend=:topright)
221221

222222
# Plot of voltage before and after convergence
223223
prob_de = ODEProblem(Model.ode!, Model.ic, (0., 10.0), params, reltol=1e-8, abstol=1e-10)
@@ -247,6 +247,6 @@ plot!(p4, [NaN], [NaN], label="K", color=:red; plotParams...)
247247
plot!(p4, legend=:best)
248248

249249
l_vertical = @layout [a c; b d]
250-
plot(p1, p2, p3, p4, layout=l_vertical, size=(700,600), title=["A" "B" "" "C" "D" ""],
250+
plot(p1, p2, p3, p4, layout=l_vertical, size=(539,500), title=["A" "B" "" "C" "D" ""],
251251
titlelocation=:left, dpi=300)
252252
savefig("results/diagrams/nobleConc.pdf")

figures.jl

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@ using CSV, DataFrames
66
t = BenchmarkTools.load("results/simTimings/data.json")[1]
77
l = @layout [a b]
88

9-
plot(t["Small"]["ODE"]["ODE - Standard"], label = "ODE - Standard", st=:box, yaxis=:log10, dpi=300, size=(450,300), linecolor=:match,
9+
plot(t["Small"]["ODE"]["ODE - Standard"], label = nothing, st=:box, dpi=300, size=(397,250), linecolor=:match,
1010
markerstrokewidth=0, title="Small Perturbation", whisker_range=0)
11-
plot!(t["Small"]["ODE"]["ODE - Tracking"], label = "ODE - Tracking", st=:box, yaxis=:log10, linecolor=:match,
11+
plot!(t["Small"]["ODE"]["ODE - Tracking"], label = nothing, st=:box, linecolor=:match,
1212
markerstrokewidth=0, whisker_range=0)
13-
plot!(t["Small"]["Cont"], st=:box, yaxis=:log10, legend=:bottomleft, xaxis=nothing, linecolor=:match,
14-
markerstrokewidth=0, ylabel="Time (s)", yformatter=x->x/1e9, ylim=(0.05e9, 1e9), whisker_range=0)
13+
plot!(t["Small"]["Cont"]["Cont - Shooting"], st=:box, xaxis=nothing, linecolor=:match,
14+
markerstrokewidth=0, ylabel="Time (s)", yformatter=x->x/1e9, ylim=(0, 0.75e9), whisker_range=0)
15+
xaxis!(xticks=([1, 2, 3], ["Standard", "Tracking", "Continuation"]), xminorticks=false)
1516
plotA = yaxis!(minorgrid=true)
16-
plot(t["Large"]["ODE"]["ODE - Standard"], st=:box, yaxis=:log10, dpi=300, size=(450,300), title="Large Perturbation",
17+
plot(t["Large"]["ODE"]["ODE - Standard"], st=:box, dpi=300, size=(397,300), title="Large Perturbation",
1718
linecolor=:match, markerstrokewidth=0, whisker_range=0)
18-
plot!(t["Large"]["ODE"]["ODE - Tracking"], st=:box, yaxis=:log10, linecolor=:match,
19+
plot!(t["Large"]["ODE"]["ODE - Tracking"], st=:box, linecolor=:match,
1920
markerstrokewidth=0, whisker_range=0)
20-
plot!(t["Large"]["Cont"], st=:box, yaxis=:log10, legend=nothing, xaxis=nothing, linecolor=:match, markerstrokewidth=0,
21-
ylabel="", yformatter=x->x/1e9, ylim=(0.05e9, 1e9), whisker_range=0)
21+
plot!(t["Large"]["Cont"]["Cont - Shooting"], st=:box, legend=nothing, xaxis=nothing, linecolor=:match, markerstrokewidth=0,
22+
ylabel="", yformatter=x->x/1e9, ylim=(0, 0.75e9), whisker_range=0)
23+
xaxis!(xticks=([1, 2, 3], ["Standard", "Tracking", "Continuation"]), xminorticks=false)
2224
plotB = yaxis!(minorgrid=true)
2325

24-
plot(plotA, plotB, layout=l, size=(539,200), dpi=300, margin=5Plots.mm, link=:y)
25-
annotate!(-0.7, 1.75e9, text("A", 12, :black), subplot=1)
26-
annotate!(-0.7, 1.75e9, text("B", 12, :black), subplot=2)
26+
plot(plotA, plotB, layout=l, size=(539,250), dpi=300, margins=2Plots.mm)
27+
annotate!(0, 0.8e9, text("A", 12, :black), subplot=1)
28+
annotate!(0, 0.8e9, text("B", 12, :black), subplot=2)
2729
savefig("results/simTimings/simTimings.pdf")
2830

2931
# MCMC
@@ -131,10 +133,11 @@ tStandard = BenchmarkTools.load("results/cipa/simTimings/standard.json")[1]
131133
tTracking = BenchmarkTools.load("results/cipa/simTimings/tracking.json")[1]
132134
tCont = BenchmarkTools.load("results/cipa/simTimings/continuation.json")[1]
133135

134-
plot(tStandard, st=:box, yaxis=:log10, dpi=300, size=(450, 300), linecolor=:match,
135-
markerstrokewidth=0, title="CiPA Limit Cycle Convergence Times", label="Standard", whisker_range=0)
136-
plot!(tTracking, st=:box, linecolor=:match, markerstrokewidth=0, label = "Tracking", whisker_range=0)
137-
plot!(tCont, st=:box, yaxis=:log10, legend=:bottomleft, xaxis=nothing, linecolor=:match,
138-
markerstrokewidth=0, ylabel="Time (s)", yformatter=x -> x / 1e9, label = "Continuation", ylim=(1e10, 1e12), whisker_range=0)
136+
plot(tStandard, st=:box, dpi=300, size=(397, 300), linecolor=:match,
137+
markerstrokewidth=0, title="CiPA Convergence Times", label=nothing, whisker_range=0)
138+
plot!(tTracking, st=:box, linecolor=:match, markerstrokewidth=0, label = nothing, whisker_range=0)
139+
plot!(tCont, st=:box, legend=:bottomleft, xaxis=nothing, linecolor=:match,
140+
markerstrokewidth=0, ylabel="Time (s)", yformatter=x -> x / 1e9, label = nothing, ylim=(0, 0.75e12), whisker_range=0)
139141
yaxis!(minorgrid=true)
142+
xaxis!(xticks=([1,2,3], ["Standard", "Tracking", "Continuation"]), xminorticks=false)
140143
savefig("results/cipa/simTimings/simTimings.pdf")
-4.59 KB
Binary file not shown.

results/diagrams/nobleConc.pdf

-289 KB
Binary file not shown.

results/simTimings/simTimings.pdf

21.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)