Julia plots error with errorbars in v0.29.0

I have been quite happily plotting graphs with errorbars in julia, but today it started to give me an error. I have tried searching for this issue but haven’t been able to find anything.

using Plots
plot([1,2,3,4],[1,2,3,4],yerr=[1,2,3,4])

Gives me the error:

MethodError: no method matching error_style!(::Plots.Attr)
Closest candidates are:
  error_style!(!Matched::Dict{Symbol,Any}) at C:\Users\padmer\.julia\packages\Plots\fGqyH\src\recipes.jl:817

Stacktrace:
 [1] macro expansion at C:\Users\padmer\.julia\packages\Plots\fGqyH\src\recipes.jl:856 [inlined]
 [2] apply_recipe(::Plots.Attr, ::Type{Val{:yerror}}, ::Array{Float64,1}, ::Array{Float64,1}, ::Nothing) at C:\Users\padmer\.julia\packages\RecipesBase\G4s6f\src\RecipesBase.jl:279
 [3] _process_seriesrecipe(::Plots.Plot{Plots.GRBackend}, ::Plots.Attr) at C:\Users\padmer\.julia\packages\Plots\fGqyH\src\pipeline.jl:411
 [4] _plot!(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{Array{Int64,1},Array{Int64,1}}) at C:\Users\padmer\.julia\packages\Plots\fGqyH\src\plot.jl:233
 [5] #plot#138(::Base.Iterators.Pairs{Symbol,Array{Int64,1},Tuple{Symbol},NamedTuple{(:yerr,),Tuple{Array{Int64,1}}}}, ::typeof(plot), ::Array{Int64,1}, ::Vararg{Array{Int64,1},N} where N) at C:\Users\padmer\.julia\packages\Plots\fGqyH\src\plot.jl:57
 [6] (::RecipesBase.var"#kw##plot")(::NamedTuple{(:yerr,),Tuple{Array{Int64,1}}}, ::typeof(plot), ::Array{Int64,1}, ::Array{Int64,1}) at .\none:0
 [7] top-level scope at In[4]:2

I tried removing and the reinstalling the plots package but it still happens, it occurs both in REPL and a jupyter notebooks environment with pyplot, plotly and GR

I’m running Julia 1.3.1 and my Plots.jl version is v0.29.0 running on Windows 10

If I change the plots version to v0.28.0 then I no longer have this error.

Is anyone else experiencing this?

1 Like

Yes https://github.com/JuliaPlots/Plots.jl/issues/2389
We merged a great improvement of recipes in RecipesBase, that appears to have had some unforeseen consequences. You can pin Plots to 0.28 and RecipesBase to 0.7 until this is resolved.

3 Likes

Okay great, thanks for the quick reply and sorry for my clearly incomplete search :slight_smile: