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
I installed Julia 1.6.5 and reinstalled Plots. This seems to work. It may be that the problem is connected with 1.7.1. Unfortunately I'm too new in Julia to go any deeper into the problem.
It would be useful to understand if others have the issue...
===
My code: comes directly from the help (!)
using Plots
histogram([1,2,1,1,4,3,8],bins=0:8)
I get:
The function body AST defined by this @generated function is not pure. This likely means it contains a closure, a comprehension or a generator.
Stacktrace:
[1] #_make_hist#236
@ ~/.julia/packages/Plots/qZHsp/src/recipes.jl:674 [inlined]
[2] macro expansion
@ ~/.julia/packages/Plots/qZHsp/src/recipes.jl:685 [inlined]
[3] apply_recipe(plotattributes::Dict{Symbol, Any}, #unused#::Type{Val{:barhist}}, x::Base.OneTo{Int64}, y::Vector{Float64}, z::Nothing)
@ Plots ~/.julia/packages/RecipesBase/zBoFG/src/RecipesBase.jl:275
[4] _process_seriesrecipe(plt::Plots.Plot{Plots.GRBackend}, plotattributes::Dict{Symbol, Any})
@ Plots ~/.julia/packages/Plots/qZHsp/src/pipeline.jl:408
[5] _process_seriesrecipe(plt::Plots.Plot{Plots.GRBackend}, plotattributes::Dict{Symbol, Any})
@ Plots ~/.julia/packages/Plots/qZHsp/src/pipeline.jl:417
[6] _plot!(plt::Plots.Plot{Plots.GRBackend}, plotattributes::Dict{Symbol, Any}, args::Tuple{Vector{Int64}})
@ Plots ~/.julia/packages/Plots/qZHsp/src/plot.jl:234
[7] plot(args::Vector{Int64}; kw::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:bins, :seriestype), Tuple{UnitRange{Int64}, Symbol}}})
@ Plots ~/.julia/packages/Plots/qZHsp/src/plot.jl:57
[8] #histogram#411
@ ~/.julia/packages/RecipesBase/zBoFG/src/RecipesBase.jl:369 [inlined]
[9] top-level scope
@ In[9]:1
[10] eval
@ ./boot.jl:373 [inlined]
[11] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1196
I also tried:
using Plots
x = rand(100)
nbins = 50
histogram(x, bins=nbins)
Details
Update
I installed Julia 1.6.5 and reinstalled Plots. This seems to work. It may be that the problem is connected with 1.7.1. Unfortunately I'm too new in Julia to go any deeper into the problem.
It would be useful to understand if others have the issue...
===
My code: comes directly from the help (!)
I get:
I also tried:
And here I get:
I get the same with StatsPlots. So far I can have an histogram only with Pyplot if I use it outside of Plots.
Backends
This bug occurs on ( insert
x
below )Versions
Plots.jl version:Plots v0.28.4
Backend version (
]st -m <backend(s)>
):PlotlyJS v0.13.1; PlotlyJS v0.13.1; PyPlot v2.10.0Output of
versioninfo()
:julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
The text was updated successfully, but these errors were encountered: