Skip to content

Commit f1e9127

Browse files
committed
Fix #22
1 parent 9a225e4 commit f1e9127

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#### Changed
33
- do not print OK when calling plot any longer
44
- document the use of the fig parameter with the function plot2d
5+
- the single-argument `plot(Y)` now uses `eachindex(Y)` instead of `1:length(Y)` for better generality with custom-indexed arrays
56

67
### ControlPlots.jl v0.2.9 2025-08-21
78
#### Added

src/plot.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function plot(X, Y1::AbstractVector{<:Number}, Y2::AbstractVector{<:Number};
184184
end
185185

186186
function plot(Y::AbstractVector{<:Number}; xlabel="", ylabel="", title="", fig="", ysize=14, disp=false)
187-
X = 1:length(Y)
187+
X = collect(eachindex(Y))
188188
plot(X, Y; xlabel, ylabel, title, fig, disp, ysize)
189189
end
190190

0 commit comments

Comments
 (0)