Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Regression for ribbon supplied with tuple. Works in 1.25.5. #4103

Closed
Denis-Titov opened this issue Feb 16, 2022 · 1 comment · Fixed by #4109
Closed

[BUG] Regression for ribbon supplied with tuple. Works in 1.25.5. #4103

Denis-Titov opened this issue Feb 16, 2022 · 1 comment · Fixed by #4109
Assignees
Labels

Comments

@Denis-Titov
Copy link

Details

The following example works on 1.25.5 but doesn't work on latest version where I get error below

plot([1 2; 3 4], ribbon = ([1 2; 3 4], [1 2; 3 4]))

Seems related to #4065 which fixed similar regression for plot([1 2; 3 4], ribbon = [1 2; 3 4]) but perhaps there's still a similar error when using tuple to supply both low and high values for ribbon.

ERROR: LoadError: MethodError: no method matching +(::Float64, ::Vector{Int64})
For element-wise addition, use broadcasting with dot syntax: scalar .+ array
Closest candidates are:
  +(::Any, ::Any, ::Any, ::Any...) at ~/julia/usr/share/julia/base/operators.jl:591
  +(::T, ::T) where T<:Union{Float16, Float32, Float64} at ~/julia/usr/share/julia/base/float.jl:377
  +(::Union{Float16, Float32, Float64}, ::BigFloat) at ~/julia/usr/share/julia/base/mpfr.jl:407
  ...
Stacktrace:
 [1] make_fillrange_side(y::Vector{Float64}, rib::Matrix{Int64})
   @ Plots ~/.julia/packages/Plots/hxZ0l/src/utils.jl:420
 [2] make_fillrange_from_ribbon(kw::Dict{Symbol, Any})
   @ Plots ~/.julia/packages/Plots/hxZ0l/src/utils.jl:431
 [3] process_sliced_series_attributes!(plt::Plots.Plot{Plots.GRBackend}, kw_list::Vector{Dict{Symbol, Any}})
   @ Plots ~/.julia/packages/Plots/hxZ0l/src/pipeline.jl:163
 [4] _process_seriesrecipes!(plt::Any, kw_list::Any)
   @ RecipesPipeline ~/.julia/packages/RecipesPipeline/7ijBv/src/series_recipe.jl:16
 [5] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any)
   @ RecipesPipeline ~/.julia/packages/RecipesPipeline/7ijBv/src/RecipesPipeline.jl:97
 [6] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any)
   @ Plots ~/.julia/packages/Plots/hxZ0l/src/plot.jl:208
 [7] plot(args::Any; kw::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
   @ Plots ~/.julia/packages/Plots/hxZ0l/src/plot.jl:91
 [8] top-level scope
   @ ~/Library/Mobile Documents/com~apple~CloudDocs/Research Projects/Glycolysis Model/JuliaGlycolysisModel/Plot_Dynamic_wCI_single_ATPaseRate.jl:274
in expression starting at /Users/denis/Library/Mobile Documents/com~apple~CloudDocs/Research Projects/Glycolysis Model/JuliaGlycolysisModel/Plot_Dynamic_wCI_single_ATPaseRate.jl:274

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default)
pyplot
plotlyjs
pgfplotsx
unicodeplots
inspectdr
gaston

Versions

Plots.jl version:
Backend version (]st -m <backend(s)>):
Output of versioninfo():

@t-bltg
Copy link
Member

t-bltg commented Feb 16, 2022

Probably introduced by #4068.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants