From 33a2632168fec395450432a031e0658136dd0a06 Mon Sep 17 00:00:00 2001 From: Alexandre Kabla Date: Sun, 3 Mar 2024 13:39:46 +0000 Subject: [PATCH] Simplify model doc graph generation --- docs/make.jl | 2 +- docs/src/assets/plothelper.jl | 25 +++++++++++++------------ docs/src/model_elements.jl | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 6de15179..a76f011b 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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"]) diff --git a/docs/src/assets/plothelper.jl b/docs/src/assets/plothelper.jl index a7ee63a7..92e01608 100644 --- a/docs/src/assets/plothelper.jl +++ b/docs/src/assets/plothelper.jl @@ -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) @@ -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 @@ -81,4 +82,4 @@ function plotmodel(modelvect; ymaxG = nothing, ymaxJ = nothing) return fig -end \ No newline at end of file +end diff --git a/docs/src/model_elements.jl b/docs/src/model_elements.jl index 2dddb5b2..b4495ec7 100644 --- a/docs/src/model_elements.jl +++ b/docs/src/model_elements.jl @@ -69,4 +69,4 @@ end ## Dashpot push!(models, RheoModel(Dashpot, η = 1.0)) -plotmodel(models, ymaxG = 2.0) \ No newline at end of file +plotmodel(models, ymaxG = 2.0)