Skip to content

Commit

Permalink
Simplify model doc graph generation
Browse files Browse the repository at this point in the history
  • Loading branch information
akabla committed Mar 3, 2024
1 parent 7c47fa5 commit 33a2632
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function maindocbuilder()
"Kelvin-Voigt" => "model_kv.md",
"Zener" => "model_zener.md",
"Poynting-Thomson" => "model_pt.md",
#"Burgers" => "model_burgers.md",
"Burgers" => "model_burgers.md",
"Create Your Model" => "model_create.md"],
"Additional Examples" => "examples.md",
"API" => "API.md"])
Expand Down
25 changes: 13 additions & 12 deletions docs/src/assets/plothelper.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using PyPlot
using PyCall
# using PyCall

# need a separate Python helper file for
# centered lower figure as colon operator
# not implemented fully implemented in PyCall
gs = pyimport("matplotlib.gridspec")
pushfirst!(PyVector(pyimport("sys")."path"), joinpath("assets"))
plothelper = pyimport("plothelper")
# gs = pyimport("matplotlib.gridspec")
# pushfirst!(PyVector(pyimport("sys")."path"), joinpath("assets"))
# plothelper = pyimport("plothelper")

function plotmodel(modelvect; ymaxG = nothing, ymaxJ = nothing)

Expand All @@ -21,13 +21,14 @@ function plotmodel(modelvect; ymaxG = nothing, ymaxJ = nothing)

colplot = ["red", "#dc7633", "#229954", "#d4ac0d", "blue"]

fig, spec, ax1, ax2, ax3 = plothelper.get_fig_axes()
spec.update(wspace = 0.25,
hspace = 0.25,
top = 0.96,
bottom = 0.07,
left = 0.07,
right = 0.98)
fig, axs = subplots(3,1, figsize=(7,20))
ax1, ax2, ax3 = axs
# spec.update(wspace = 0.25,
# hspace = 0.25,
# top = 0.96,
# bottom = 0.07,
# left = 0.07,
# right = 0.98)

for i = 1:1:length(modelvect)
#Relaxation modulus
Expand Down Expand Up @@ -81,4 +82,4 @@ function plotmodel(modelvect; ymaxG = nothing, ymaxJ = nothing)

return fig

end
end
2 changes: 1 addition & 1 deletion docs/src/model_elements.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ end
## Dashpot
push!(models, RheoModel(Dashpot, η = 1.0))

plotmodel(models, ymaxG = 2.0)
plotmodel(models, ymaxG = 2.0)

0 comments on commit 33a2632

Please sign in to comment.