PlotlyJS.jl icon indicating copy to clipboard operation
PlotlyJS.jl copied to clipboard

PlotlyJS.Plot does not work in Jupyter Notebook 7.3.1

Open empet opened this issue 1 year ago • 1 comments

I installed Julia 1.11.2, and Jupyter Notebook 7.3.1. While this simple code

Plot(scatter(x=[1.0, 2.0, 3.0],  y=[0.0, 1.5, 0.0], mode="lines", 
                   line_width=3),
        Layout(width=500, height=400))

works when run in REPL, in Jupyter Notebook it throws the error:

MethodError: no method matching resize!(::Memory{UInt8}, ::Int64)
The function `resize!` exists, but no method is defined for this combination of argument types.
Closest candidates are:
  resize!(::BitVector, ::Integer)
   @ Base bitarray.jl:814
  resize!(::Vector, ::Integer)
   @ Base array.jl:1447
Stacktrace:
 [1] display_dict(p::Plot{Vector{GenericTrace{Dict{Symbol, Any}}}, Layout{Dict{Symbol, Any}}, Vector{PlotlyFrame}})
   @ PlotlyBase C:\Users\empet\.julia\packages\PlotlyBase\4NWbR\src\PlotlyBase.jl:165
 [2] #invokelatest#2
   @ .\essentials.jl:1055 [inlined]
 [3] invokelatest
   @ .\essentials.jl:1052 [inlined]
 [4] execute_request(socket::ZMQ.Socket, msg::IJulia.Msg)
   @ IJulia C:\Users\empet\.julia\packages\IJulia\dR0lE\src\execute_request.jl:119
 [5] #invokelatest#2
   @ .\essentials.jl:1055 [inlined]
 [6] invokelatest
   @ .\essentials.jl:1052 [inlined]
 [7] eventloop(socket::ZMQ.Socket)
   @ IJulia C:\Users\empet\.julia\packages\IJulia\dR0lE\src\eventloop.jl:8
 [8] (::IJulia.var"#15#18")()
   @ IJulia C:\Users\empet\.julia\packages\IJulia\dR0lE\src\eventloop.jl:38

empet avatar Dec 11 '24 19:12 empet

Seems related to #489

jd-foster avatar Dec 11 '24 21:12 jd-foster

@empet Could you please check this with the new release?

jd-foster avatar Aug 07 '25 04:08 jd-foster

Sorry, this is a resolved issue and I forgot to close it.

empet avatar Aug 09 '25 16:08 empet