Skip to content

Possible documentation improvement #5232

@mmikhasenko

Description

@mmikhasenko

Currently the doc string of @animate says

p = plot(1)
anim = @animate for x=0:0.1:5
    push!(p, 1, sin(x))
end
gif(anim)

but pushing (push!) to a plot, I think, is not the most common approach,
and it always takes me a few minutes to figure out how to put several independent plots into a gif sequence.

I propose replacing the example by

anim = @animate for x_max in range(0,2)
    plot(0, x_max, sin)
end
gif(anim, fps=5, loop=1)

Also adding better docstring to gif should be part of the same PR,
currently

Image
  • parameter loop is not clear, why int as well as
  • variable_palette=false
  • verbose=false
  • show_msg=true

I'll take care of it once have a moment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions