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
From here, it seems that barplot also accepts x 1 element longer than y, in which case, it's used as "edges" rather than "centers", but it currently errors in two different places:
julia>barplot([1, 5, 6, 10], [1,2,3])
ERROR:DimensionMismatch("arrays could not be broadcast to a common size")
Stacktrace:
[1] _bcs1 at ./broadcast.jl:439 [inlined]
[2] _bcs at ./broadcast.jl:433 [inlined]
[3] broadcast_shape at ./broadcast.jl:427 [inlined]
[4] combine_axes at ./broadcast.jl:422 [inlined]
[5] instantiate at ./broadcast.jl:266 [inlined]
[6] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(+),Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(last),Tuple{Array{Vec{2,Float32},1}}},Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1},Nothing,typeof(last),Tuple{Array{Point{2,Float32},1}}}}}) at ./broadcast.jl:724
[7] data_limits(::BarPlot{...}) at /home/pietro/.julia/dev/AbstractPlotting/src/basic_recipes/basic_recipes.jl:457
[8] macro expansion at /home/pietro/.julia/dev/AbstractPlotting/src/basic_recipes/basic_recipes.jl:356 [inlined]
[9] macro expansion at /home/pietro/.julia/dev/AbstractPlotting/src/utilities/logging.jl:79 [inlined]
[10] macro expansion at /home/pietro/.julia/dev/AbstractPlotting/src/utilities/logging.jl:15 [inlined]
[11] (::getfield(AbstractPlotting, Symbol("##500#504")){Scene,BarPlot{...}})(::AbstractPlotting.Automatic, ::Vec{3,Float32}) at /home/pietro/.julia/dev/AbstractPlotting/src/basic_recipes/basic_recipes.jl:346
[12] map_once(::Function, ::Reactive.Signal{Any}, ::Reactive.Signal{Any}) at /home/pietro/.julia/dev/AbstractPlotting/src/interaction/nodes.jl:80
[13] plot!(::Scene, ::BarPlot{...}, ::Attributes) at /home/pietro/.julia/dev/AbstractPlotting/src/basic_recipes/basic_recipes.jl:344
[14] plot!(::Scene, ::Type{BarPlot{...}}, ::Attributes, ::Array{Int64,1}, ::Vararg{Array{Int64,1},N}where N) at /home/pietro/.julia/dev/AbstractPlotting/src/interfaces.jl:392
[15] #plot!#155 at /home/pietro/.julia/dev/AbstractPlotting/src/interfaces.jl:369 [inlined]
[16] plot! at /home/pietro/.julia/dev/AbstractPlotting/src/interfaces.jl:369 [inlined]
[17] #plot#149 at /home/pietro/.julia/dev/AbstractPlotting/src/interfaces.jl:356 [inlined]
[18] plot at /home/pietro/.julia/dev/AbstractPlotting/src/interfaces.jl:356 [inlined]
[19] #barplot#310 at /home/pietro/.julia/dev/AbstractPlotting/src/recipes.jl:77 [inlined]
[20] barplot(::Array{Int64,1}, ::Array{Int64,1}) at /home/pietro/.julia/dev/AbstractPlotting/src/recipes.jl:77
[21] top-level scope at none:0
julia>barplot([1, 5, 6, 10], [1,2,3], raw =true)
Error showing value of type Scene:
ERROR: buffer scale has not the same length as the other buffers.
Has:3. Should have:4
I also believe that if the user passes edges, widths should correspond to the edges, meaning hw = diff(edges) rather than hw = mean(diff(centers)) as it is now.
The text was updated successfully, but these errors were encountered:
From here, it seems that
barplot
also acceptsx
1 element longer thany
, in which case, it's used as "edges" rather than "centers", but it currently errors in two different places:I also believe that if the user passes edges, widths should correspond to the edges, meaning
hw = diff(edges)
rather thanhw = mean(diff(centers))
as it is now.The text was updated successfully, but these errors were encountered: