JuliaPlots / JuliaPlots/PlotlyJS.jl
Using `plotlyjs()` backend in Julia notebook for histograms throws `UndefRefError: access to undefined reference`
- Dominant language
- Julia
- Stars
- 444
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When using `plotlyjs()` backend for Plots in the jupyter notebook. It throws UndefRefError access to undefined reference
**Version info**
Please provide the following:
1. Julia Version 1.6.0
2. [336ed68f] CSV v0.8.4
[35d6a980] ColorSchemes v3.12.0
[a93c6f00] DataFrames v1.1.0
[31c24e10] Distributions v0.24.18
[38e38edf] GLM v1.4.2
[28b8d3ca] GR v0.57.4
[09f84164] HypothesisTests v0.10.3
[7073ff75] IJulia v1.21.2
[47be7bcc] ORCA v0.5.0
[995b91a9] PlotUtils v1.0.10
[f0f68f2c] PlotlyJS v0.14.1
[91a5bcdd] Plots v1.13.1
[438e738f] PyCall v1.92.3
[d330b81b] PyPlot v2.9.0
[2913bbd2] StatsBase v0.33.6
[f3b207a7] StatsPlots v0.14.19
[0f1e0344] WebIO v0.8.15
[8bb1440f] DelimitedFiles
My code:
norm1 = randn(1000);
Plots.histogram(norm1, bins = 10, label = "Standard normal distribution", title = "Histogram")
Output:
UndefRefError: access to undefined reference
Stacktrace:
[1] getindex
@ .\array.jl:801 [inlined]
[2] iterate
@ .\array.jl:777 [inlined]
[3] show_json(io::JSON.Writer.PrettyContext{IOBuffer}, s::JSON.Serializations.StandardSerialization, x::Vector{Any})
@ JSON.Writer ~\.julia\packages\JSON\3rsiS\src\Writer.jl:293
[4] #show_json#3
@ ~\.julia\packages\JSON\3rsiS\src\Writer.jl:325 [inlined]
[5] print(io::IOBuffer, obj::Vector{Any}, indent::Int64)
@ JSON.Writer ~\.julia\packages\JSON\3rsiS\src\Writer.jl:347
[6] sprint(::Function, ::Vector{Any}, ::Vararg{Any, N} where N; context::Nothing, sizehint::Int64)
@ Base .\strings\io.jl:105
[7] sprint
@ .\strings\io.jl:101 [inlined]
[8] json
@ ~\.julia\packages\JSON\3rsiS\src\Writer.jl:366 [inlined]
[9] plotly_series_json
@ ~\.julia\packages\Plots\Jwaoy\src\backends\plotly.jl:903 [inlined]
[10] plotly_html_body(plt::Plots.Plot{Plots.PlotlyJSBackend}, style::Nothing)
@ Plots ~\.julia\packages\Plots\Jwaoy\src\backends\plotly.jl:951
[11] plotly_html_body
@ ~\.julia\packages\Plots\Jwaoy\src\backends\plotly.jl:926 [inlined]
[12] html_body
@ ~\.julia\packages\Plots\Jwaoy\src\backends\plotlyjs.jl:35 [inlined]
[13] standalone_html(plt::Plots.Plot{Plots.PlotlyJSBackend}; title::String)
@ Plots ~\.julia\packages\Plots\Jwaoy\src\backends\web.jl:7
[14] standalone_html(plt::Plots.Plot{Plots.PlotlyJSBackend})
@ Plots ~\.julia\packages\Plots\Jwaoy\src\backends\web.jl:7
[15] _show
@ ~\.julia\packages\Plots\Jwaoy\src\backends\plotlyjs.jl:37 [inlined]
[16] show(io::IOBuffer, m::MIME{Symbol("text/html")}, plt::Plots.Plot{Plots.PlotlyJSBackend})
@ Plots ~\.julia\packages\Plots\Jwaoy\src\output.jl:215
[17] sprint(::Function, ::MIME{Symbol("text/html")}, ::Vararg{Any, N} where N; context::Nothing, sizehint::Int64)
@ Base .\strings\io.jl:105
[18] sprint
@ .\strings\io.jl:101 [inlined]
[19] _ijulia_display_dict(plt::Plots.Plot{Plots.PlotlyJSBackend})
@ Plots ~\.julia\packages\Plots\Jwaoy\src\ijulia.jl:56
[20] display_dict(plt::Plots.Plot{Plots.PlotlyJSBackend})
@ Plots ~\.julia\packages\Plots\Jwaoy\src\init.jl:77
[21] #invokelatest#2
@ .\essentials.jl:708 [inlined]
[22] invokelatest
@ .\essentials.jl:706 [inlined]
[23] execute_request(socket::ZMQ.Socket, msg::IJulia.Msg)
@ IJulia ~\.julia\packages\IJulia\DrVMH\src\execute_request.jl:112
[24] #invokelatest#2
@ .\essentials.jl:708 [inlined]
[25] invokelatest
@ .\essentials.jl:706 [inlined]
[26] eventloop(socket::ZMQ.Socket)
@ IJulia ~\.julia\packages\IJulia\DrVMH\src\eventloop.jl:8
[27] (::IJulia.var"#15#18")()
@ IJulia .\task.jl:406
any help?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.