From e9a3f993ad839b30169660c616033a844c654dca Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Fri, 13 Sep 2024 20:03:35 +0200 Subject: [PATCH] add ylims --- src/plot.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plot.jl b/src/plot.jl index c8b28bf..6e1b36e 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -110,12 +110,18 @@ function plot(X, Y1::AbstractVector{<:Number}, Y2::AbstractVector{<:Number}; if ylabels != ["", ""] plt.ylabel(ylabels[1], fontsize=ysize); end + if ! isnothing(ylims) + plt.ylim(ylims[1]) + end plt.twinx() else l2, = plt.plot(X, Y; label=labels[i], color="red") if ylabels[2] != "" plt.ylabel(ylabels[2], fontsize=ysize); end + if ! isnothing(ylims) + plt.ylim(ylims[2]) + end end end