Skip to content

Commit

Permalink
Make better use of xlim
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Fechner committed Apr 10, 2024
1 parent 8b4c8cb commit 82456d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ControlPlots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ function plot(X, Y::AbstractVector{<:Number}; xlabel="", ylabel="", fig="", disp
if xlabel != ""
plt.xlabel(xlabel, fontsize=14);
end
plt.ylabel(ylabel, fontsize=14);
plt.ylabel(ylabel, fontsize=14);
plt.xlim(X[begin], X[end])
plt.grid(true)
plt.tight_layout()
end
Expand Down Expand Up @@ -100,7 +101,7 @@ function plotx(X, Y...; xlabel="time [s]", ylabels=nothing, fig="", title="", di
lbl=""
end
plt.plot(X, y, label=lbl)
plt.xlim(0, X[end])
plt.xlim(X[begin], X[end])
plt.ylabel(lbl, fontsize=14);
plt.grid(true)
if i < len
Expand Down

0 comments on commit 82456d0

Please sign in to comment.