Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matlab's "hold on" in Julia

I'm just looking for an equivalent of Matlab's hold on command in Julia.

I have x Array that is 15x1 and y Array 15x6, so this will make 6 plots all at once. What I want to do is plot each y[:,1],y[:,2],...,y[:,6] one at a time (pausing say 5 seconds between each one) for a better illustration of convergence of a numerical method rather than just slapping all 6 iterations on there at once.

I'm using the pyplot backend with the Plots.jl package.

like image 984
user26837 Avatar asked May 01 '17 19:05

user26837


1 Answers

Call plot! instead of plot. For example

using Plots
pyplot()
plot!(rand(10))
plot!(rand(10))
like image 185
gggg Avatar answered Nov 14 '22 03:11

gggg