Skip to content

Commit

Permalink
rename plot to plotn
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Fechner committed Apr 4, 2024
1 parent 4aff721 commit dba48d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ControlPlots"
uuid = "23c2ee80-7a9e-4350-b264-8e670f12517c"
authors = ["Uwe Fechner <[email protected]> and contributors"]
version = "0.0.3"
version = "0.0.4"

[deps]
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ using ControlPlots
x = 1.5*ones(11)
y = 1:0.1:2
out = min.(x, y)
plot(1:11, [x, y, out]; labels=["input_a", "input_b", "output"], fig="2-in-one")
plotn(1:11, [x, y, out]; labels=["input_a", "input_b", "output"], fig="2-in-one")
```
6 changes: 3 additions & 3 deletions src/ControlPlots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PyPlot.show as plshow
import Base.display
import JLD2

export plot, plotx, plotxy, plt, load, save
export plot, plotn, plotx, plotxy, plt, load, save

mutable struct PlotX
X
Expand All @@ -25,7 +25,7 @@ function load(filename::String)
JLD2.load(filename)["plot"]
end

function plot(X, Ys::Vector{AbstractVector{Float64}}; xlabel="", ylabel="",
function plotn(X, Ys; xlabel="", ylabel="",
labels=nothing, fig="", disp=false)
if disp
if fig != ""
Expand Down Expand Up @@ -132,7 +132,7 @@ function display(P::PlotX)
elseif P.type == 3
plotxy(P.X, P.Y; xlabel=P.xlabel, ylabel=P.ylabels, fig=P.fig, disp=true)
else
plot(P.X, P.Y; xlabel=P.xlabel, labels=P.labels, fig=P.fig, disp=true)
plotn(P.X, P.Y; xlabel=P.xlabel, labels=P.labels, fig=P.fig, disp=true)
end
plt.pause(0.01)
plt.show(block=false)
Expand Down

0 comments on commit dba48d0

Please sign in to comment.