Skip to content

Commit 1c15203

Browse files
authored
Merge pull request #154 from control-toolbox/auto-juliaformatter-pr
[AUTO] JuliaFormatter.jl run
2 parents 9f60a71 + 4761f3f commit 1c15203

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

ext/plot.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,13 +1111,11 @@ function Plots.plot!(
11111111
dual_style::Union{NamedTuple,Symbol}=__plot_style(),
11121112
kwargs...,
11131113
)
1114-
11151114
model = CTModels.model(sol)
11161115

11171116
# check if the plot is empty
11181117
if isempty(p.series_list)
1119-
1120-
attr = NamedTuple((Symbol(key),value) for (key,value) in p.attr if key != :layout)
1118+
attr = NamedTuple((Symbol(key), value) for (key, value) in p.attr if key != :layout)
11211119

11221120
pnew = __initial_plot(
11231121
sol,
@@ -1147,10 +1145,9 @@ function Plots.plot!(
11471145
)
11481146

11491147
# replace p by pnew, must have a side effect
1150-
for k fieldnames(typeof(p))
1151-
setfield!(p, k, getfield(pnew, k))
1148+
for k in fieldnames(typeof(p))
1149+
setfield!(p, k, getfield(pnew, k))
11521150
end
1153-
11541151
end
11551152

11561153
# plot the solution with infos from the model

test/extras/plot_manual.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ end;
133133
sol = get_solution();
134134

135135
#
136-
plt = plot(size=(800,800))
136+
plt = plot(; size=(800, 800))
137137
pp = plot!(plt, sol)
138138

139139
pp

0 commit comments

Comments
 (0)