Skip to content

Commit

Permalink
Fix plotxy, add plot(Y)
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Apr 9, 2024
1 parent 3753bab commit 6e5985d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ControlPlots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ function plot(X, Ys::AbstractVector{<:AbstractVector}; xlabel="", ylabel="",
PlotX(X, Ys, labels, xlabel, ylabel, fig, 4)
end

function plot(Y::AbstractVector{<:Number}; xlabel="", ylabel="", fig="", disp=false)
X = 1:length(Y)
plot(X, Y; xlabel, ylabel, fig, disp)
end

function plot(X, Y::AbstractVector{<:Number}; xlabel="", ylabel="", fig="", disp=false)
if disp
if fig != ""
Expand Down Expand Up @@ -121,7 +126,7 @@ function plotxy(X, Y; xlabel="", ylabel="", fig="", disp=false)
plt.grid(true)
plt.tight_layout()
end
PlotX(X, Y, xlabel, nothing, ylabel, fig, 3)
PlotX(X, Y, nothing, xlabel, ylabel, fig, 3)
end

function display(P::PlotX)
Expand Down

0 comments on commit 6e5985d

Please sign in to comment.