Error plot not defined in RecipesBase

Could you please help debugging this simple issue I am having trying to define a user plot recipe?

module FooPlots

using RecipesBase

@userplot FooPlot

@recipe function f(dr::FooPlot)
  # code goes here
end

end

using Plots
using FooPlots

fooplot()

ERROR: UndefVarError: plot not defined
Stacktrace:
 [1] #fooplot#1(::Array{Any,1}, ::Function) at /home/juliohm/.julia/v0.6/RecipesBase/src/RecipesBase.jl:340
 [2] fooplot() at /home/juliohm/.julia/v0.6/RecipesBase/src/RecipesBase.jl:340

What is missing?

What version?

julia> Pkg.status(“Plots”)

  • Plots 0.12.2

julia> Pkg.status(“RecipesBase”)

  • RecipesBase 0.2.1

Oh, plot isn’t exported. Do import RecipesBase: plot.

Could you please confirm this is a bug? I never had to export plot myself explicitly before.

Using just RecipesBase? plot used to not exist in RecipesBase, so that couldn’t be the case.

Yes, at least in both packages where I used it before, I only do

using RecipesBase

See GeoStats.jl and ImageQuilting.jl.

https://github.com/JuliaPlots/RecipesBase.jl/pull/24

Thank you @ChrisRackauckas, on the spot as usual :slight_smile: