Plotlyjs - animation errors in examples

Almost all example from runs well under Jupyter notebook (some as is, some after minor Julia/Pkg fixes due to version updates).

But 3 errors I can’t easy fix:

  1. Animation
    p = plot([sin,cos],zeros(0),leg=false)
    anim = Animation()
    for x = linspace(0,10π,100)

MethodError: no method matching handle_new_from_data(::Dict{String,Any})
Closest candidates are:
** handle_new_from_data(::AbstractString) at /home/o/.julia/v0.5/Rsvg/src/calls.jl:69**
** handle_new_from_data(::AbstractString, ::Gtk.GLib.GError) at /home/o/.julia/v0.5/Rsvg/src/calls.jl:61**

  1. Styles
    styles = setdiff(supported_styles(),[:auto])’

UndefVarError: supported_styles not defined

  1. Markers
    markers = setdiff(supported_markers(),[:none,:auto,Shape])’
    n = length(markers)
    x = (linspace(0,10,n + 2))[2:end - 1]
    y = repmat(reverse(x)',n,1)

UndefVarError: supported_markers not defined

I am using Julia 0.5.2 latest version as of today

Can someone help? Thanks.

For 2 and 3: There is a small error in the docs, as supported_styles is not exported. This should be Plots.supported_styles() and Plots.supported_markers() instead. Do you feel like making a PR against (I think the pages for all backends should be updated)?

1 Like

For animations in jupyter, try creating a gif instead - like the example of the lorenz attractor on the home page. If you keep getting an error perhaps open an issue on Plots.

Thank you - it works for 2 and 3 after fixes.

Yes, updating all backends examples should be quite useful for newcomers. On the other hands, Julia itself is evolving a lot, so some changes and bugs are expected.

Animation has failed for gif also - I have opened an issue on Plots.