I am doing a cheap animation by displaying a plot every 1/60th of a second using the Plots package. Unfortunately, it is not very fast. It happens that this is the call to the display function that is slow.
Are you open to using a different plotting package? GLMakie has some good options here, where you can update an Observable and the plot just updates without redrawing.
?
I have browsed GR.jl documentation (and source) but I was unable to find the list of parameters available to the plot command. At the moment, I just need to draw a line between two points (no grid, no box, no axis, just a line).
using GLMakie
# You can prepare the figure and axis config like this,
# and pass them to `update_theme!` or to a plot function as done below
figure = (resolution=(600, 600),)
axis = (limits=(-1.2, 1.2, -1.2, 1.2),
xgridvisible=false, ygridvisible=false)
points = Observable([Point2f(0,1), Point2f(1,0)])
lines(points, color=:black; figure, axis)
# The previous line opens a window and shows the initial plot
# You can then update it using `point[]` to change the array of points
for i = 1:100
points[] = push!(points[], rand(Point2f))
sleep(1/60)
end