You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I think I encountered two different bugs. I'm a new user of plotly*, so sorry if I'm just doing everything wrong.
The first is in restyle
julia> pl =plot(scatter(x=1:10, y=1:10))
julia>restyle(pl, 1, y=1:2:20)
ERROR: MethodError: no method matching PlotlyJS.ElectronDisplay()
Closest candidates are:
PlotlyJS.ElectronDisplay(::Base.Random.UUID) at /home/carlo/.julia/v0.6/PlotlyJS/src/displays/electron.jl:12
PlotlyJS.ElectronDisplay(::Base.Random.UUID, ::Nullable{Any}) at /home/carlo/.julia/v0.6/PlotlyJS/src/displays/electron.jl:6
PlotlyJS.ElectronDisplay(::PlotlyBase.Plot) at /home/carlo/.julia/v0.6/PlotlyJS/src/displays/electron.jl:13
The second in restyle!
julia> pl =plot(scatter(x=1:10, y=1:10))
julia> pl.plot.data[1].fields
Dict{Symbol,Any} with 3 entries::y=>1:10:type=>"scatter":x=>1:10
julia>restyle!(pl, 1, y=1:2:20)
# after this the plot is a little screwed up
julia>restyle!(pl,1,y=1:2:20)
Blink.Page(3, WebSockets.WebSocket(19, TCPSocket(RawFD(23) active, 0 bytes waiting), CONNECTED::WebSockets.ReadyState=1), Dict{String,Any}(Pair{String,Any}("callback", Blink.#3)), Future(1, 1, 9, Nullable{Any}(true)))
julia> pl.plot.data[1].fields
Dict{Symbol,Any} with 3 entries::y=>1# ?????:type=>"scatter":x=>1:10
The text was updated successfully, but these errors were encountered:
The first but report is definitely a bug. I'll try to get that fixed up.
The second one is actually intentional. The API feels a bit strange, but matches the plotly.js API. The screenshot below shows what happens when I create a plot in my javascript console and then call Plotly.restyle on it. Notice that when I pass {y: [1, 3, ...]} the y attribute on the trace only has a 1 on it. However, when I pass {y: [[1, 3, ...]]} (note the two [[ and ]]), then things happen as they should.
The way to do this in julia is then to pass an array or tuple of arrays:
Hi,
I think I encountered two different bugs. I'm a new user of plotly*, so sorry if I'm just doing everything wrong.
The first is in
restyle
The second in
restyle!
The text was updated successfully, but these errors were encountered: