Skip to content

Commit

Permalink
add scatter for dual plot
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Fechner committed Sep 19, 2024
1 parent 9be7b4d commit 4160c5e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ function plot(X, Y1::AbstractVector{<:Number}, Y2::AbstractVector{<:Number};
if ! isnothing(ylims)
plt.ylim(ylims[1])
end
if scatter
plt.scatter(X, Y; s=24, c="red", alpha=1)
end
plt.twinx()
else
l2, = plt.plot(X, Y; label=labels[i], color="red")
Expand All @@ -122,6 +125,9 @@ function plot(X, Y1::AbstractVector{<:Number}, Y2::AbstractVector{<:Number};
if ! isnothing(ylims)
plt.ylim(ylims[2])
end
if scatter
plt.scatter(X, Y; s=24, c="red", alpha=1)
end
end
end

Expand Down

0 comments on commit 4160c5e

Please sign in to comment.