# \[ANN\] Releasing RecipesBase 1.0 and Plots 1.0 (please read)

**URL:** <https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056>\
**Category:** Community\
**Tags:** announcement, plots, recipe\
**Created:** [April 5, 2020, 12:18pm UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056 "2020-04-05T12:18:58Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![daschw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daschw/32/2926_2.png) [@daschw](https://discourse.julialang.org/u/daschw)\
**Post date:** [April 5, 2020, 12:18pm UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/1 "2020-04-05T12:18:58Z")

</div>

Everyone, we’re updating the version of Plots and RecipesBase to 1.0. The packages are already fairly mature, the interface has solidified and breaking releases are few. Of course, there are still open issues and development is very active (~200 PRs merged in the last year), but the package has reached a very functional state. Thanks to the literally 100s of contributors that have helped build the package to this point!

Only few packages depend on Plots – but the ~150 packages that depend on RecipesBase will have to update their compat bounds to accept RecipesBase 1.0. Note that this should be COMPLETELY SAFE – the release is not breaking. We’ve taken great care for RecipesBase to never break dependencies, but pre-1.0 this has been difficult to express in SemVer (as minor releases are breaking by definition for 0.x versions).

On the other hand, the 1.0 RecipesBase release offers some new features that make type recipes easier to implement:

- The type recipe signature for arrays of custom types

```julia
@recipe function f(::Type{T}, v::T) where T <: AbstractArray{<:MyType}

```

is now supported.

- Type recipes are now aware of the axis they are applied to. So `guide --> "My guide"` only sets the guide on the corresponding axis in type recipes.  
The current axis in type recipes can be accessed with `plotattributes[:letter]` and is either `:x`, `:y` or `:z`.

An example for how these changes can be useful e.g. for Measurements.jl is provided in [Make type recipes aware of current axes. by daschw · Pull Request #2503 · JuliaPlots/Plots.jl · GitHub](https://github.com/JuliaPlots/Plots.jl/pull/2503).  
Furthermore we have added documentation for RecipesBase at [Home · RecipesBase.jl](http://juliaplots.org/RecipesBase.jl/stable/).

So please, if your package depends on RecipesBase, we request that you up the compat bounds to 1.0 and release a new patch release immediately, to ensure that this doesn’t hold updating back.The packages depending on RecipesBase are:

```julia
AIBECS, ApproxBayes, ApproxFun, ApproxFunBase, AstroImages, AugmentedGaussianProcesses, AverageShiftedHistograms, BAT, BSplines, BasisFunctionExpansions, BioStructures, Bridge, CalculusWithJulia, CancerSeqSim, CausalityTools, ChemometricsTools, ClinicalTrialUtilities, ComplexPhasePortrait, ComplexRegions, ComplexValues, ConcaveHull, ControlSystemIdentification, ConvexBodyProximityQueries, CurveProximityQueries, DFControl, DSGE, DataInterpolations, DelayEmbeddings, DiffEqBase, DiffEqBiological, DiffEqCallbacks, DiffEqDevTools, DiffEqNoiseProcess, DiffEqPDEBase, DiffEqPhysics, DimArrays, DimensionalData, DimensionalPlotRecipes, Diversity, DutyCycles, DynamicLinearModels, DynamicMovementPrimitives, EBayes, EclipsingBinaryStars, EcoBase, EcologicalNetworksPlots, EffectiveWaves, ElasticFDA, ExtremeStats, ForestBiometrics, FourierAnalysis, GaussianProcesses, GeoArrays, GeoInterface, GeoStats, GeoStatsBase, GeoStatsDevTools, GraphRecipes, GridArrays, Harlequin, Healpix, Hyperopt, ImageQuilting, ImplicitEquations, IntervalArithmetic, Iris, IterativeSolvers, JuliaDB, KDEstimation, Kpax3, LPVSpectral, LazySets, LikelihoodProfiler, LossFunctions, LowLevelParticleFilters, MCMCChain, MCMCChains, MIToS, MLJ, MLJTuning, Manopt, Measurements, MicrobiomePlots, MinAtar, MonteCarloMeasurements, MultiJuMP, NBodySimulator, NamedPlus, NeRCA, OnlineStats, PairwiseListMatrices, Pathogen, PenaltyFunctions, PerronFrobenius, Photometry, Phylo, PhyloTrees, Plots, PointPatterns, Polyhedra, PolynomialAmoebas, Polynomials, PotentialFlow, PowerDynSolve, PowerDynamics, PowerGraphics, PyDSTool, QHull, ROCAnalysis, RadiationDetectorSignals, RadiationSpectra, RecursiveArrayTools, Reinforce, Robotlib, SDDP, SchwarzChristoffel, SeparatingAxisTheorem2D, SetProg, Sherlock, SimpleSDMLayers, SingularIntegralEquations, SingularSpectrumAnalysis, SolidStateDetectors, Soss, SparseRegression, SpatialEcology, StatPlots, StateSpaceReconstruction, StatsPlots, Stheno, StratiGraphics, SwitchOnSafety, SymEngine, SymPy, TaylorModels, Temporal, ThreadPools, TimeSeries, Trajectories, TrajectoryOptimization, UncertainData, UnitfulRecipes, ValueHistories, Variography, ViscousFlow, VoxelRayTracers, WeightedArrays

```

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [April 5, 2020, 6:59pm UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/2 "2020-04-05T18:59:36Z")

</div>

> [@daschw](#):
>
> So please, if your package depends on RecipesBase, we request that you up the compat bounds to 1.0 and release a new patch release immediately, to ensure that this doesn’t hold updating back.The packages depending on RecipesBase are:

Can you please make the list a bit more manageable? It’s hard to scroll such a long line 🙂

---

<div class="post-metadata">

**Author:** ![non-Jedi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-jedi/32/3645_2.png) [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Post date:** [April 5, 2020, 7:09pm UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/3 "2020-04-05T19:09:09Z")

</div>

Here you go: 🙂

> **List of RecipesBase reverse dependencies**
>
> - AIBECS
> - ApproxBayes
> - ApproxFun
> - ApproxFunBase
> - AstroImages
> - AugmentedGaussianProcesses
> - AverageShiftedHistograms
> - BAT
> - BSplines
> - BasisFunctionExpansions
> - BioStructures
> - Bridge
> - CalculusWithJulia
> - CancerSeqSim
> - CausalityTools
> - ChemometricsTools
> - ClinicalTrialUtilities
> - ComplexPhasePortrait
> - ComplexRegions
> - ComplexValues
> - ConcaveHull
> - ControlSystemIdentification
> - ConvexBodyProximityQueries
> - CurveProximityQueries
> - DFControl
> - DSGE
> - DataInterpolations
> - DelayEmbeddings
> - DiffEqBase
> - DiffEqBiological
> - DiffEqCallbacks
> - DiffEqDevTools
> - DiffEqNoiseProcess
> - DiffEqPDEBase
> - DiffEqPhysics
> - DimArrays
> - DimensionalData
> - DimensionalPlotRecipes
> - Diversity
> - DutyCycles
> - DynamicLinearModels
> - DynamicMovementPrimitives
> - EBayes
> - EclipsingBinaryStars
> - EcoBase
> - EcologicalNetworksPlots
> - EffectiveWaves
> - ElasticFDA
> - ExtremeStats
> - ForestBiometrics
> - FourierAnalysis
> - GaussianProcesses
> - GeoArrays
> - GeoInterface
> - GeoStats
> - GeoStatsBase
> - GeoStatsDevTools
> - GraphRecipes
> - GridArrays
> - Harlequin
> - Healpix
> - Hyperopt
> - ImageQuilting
> - ImplicitEquations
> - IntervalArithmetic
> - Iris
> - IterativeSolvers
> - JuliaDB
> - KDEstimation
> - Kpax3
> - LPVSpectral
> - LazySets
> - LikelihoodProfiler
> - LossFunctions
> - LowLevelParticleFilters
> - MCMCChain
> - MCMCChains
> - MIToS
> - MLJ
> - MLJTuning
> - Manopt
> - Measurements
> - MicrobiomePlots
> - MinAtar
> - MonteCarloMeasurements
> - MultiJuMP
> - NBodySimulator
> - NamedPlus
> - NeRCA
> - OnlineStats
> - PairwiseListMatrices
> - Pathogen
> - PenaltyFunctions
> - PerronFrobenius
> - Photometry
> - Phylo
> - PhyloTrees
> - Plots
> - PointPatterns
> - Polyhedra
> - PolynomialAmoebas
> - Polynomials
> - PotentialFlow
> - PowerDynSolve
> - PowerDynamics
> - PowerGraphics
> - PyDSTool
> - QHull
> - ROCAnalysis
> - RadiationDetectorSignals
> - RadiationSpectra
> - RecursiveArrayTools
> - Reinforce
> - Robotlib
> - SDDP
> - SchwarzChristoffel
> - SeparatingAxisTheorem2D
> - SetProg
> - Sherlock
> - SimpleSDMLayers
> - SingularIntegralEquations
> - SingularSpectrumAnalysis
> - SolidStateDetectors
> - Soss
> - SparseRegression
> - SpatialEcology
> - StatPlots
> - StateSpaceReconstruction
> - StatsPlots
> - Stheno
> - StratiGraphics
> - SwitchOnSafety
> - SymEngine
> - SymPy
> - TaylorModels
> - Temporal
> - ThreadPools
> - TimeSeries
> - Trajectories
> - TrajectoryOptimization
> - UncertainData
> - UnitfulRecipes
> - ValueHistories
> - Variography
> - ViscousFlow
> - VoxelRayTracers
> - WeightedArrays

---

<div class="post-metadata">

**Author:** ![vancleve](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vancleve/32/4183_2.png) [@vancleve](https://discourse.julialang.org/u/vancleve)\
**Post date:** [April 6, 2020, 9:55pm UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/4 "2020-04-06T21:55:25Z")

</div>

My versions of Plots and RecipesBase aren’t updating yet. Any way for me to tell which package with not yet up-to-date compat are holding them back?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [April 7, 2020, 8:41am UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/5 "2020-04-07T08:41:28Z")

</div>

Yes you can `]add Plots@1.0` to see what’s holding you back

---

<div class="post-metadata">

**Author:** ![jgreener64](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jgreener64/32/2483_2.png) [@jgreener64](https://discourse.julialang.org/u/jgreener64)\
**Post date:** [April 7, 2020, 11:22am UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/6 "2020-04-07T11:22:13Z")

</div>

Done for BioStructures.jl!

---

<div class="post-metadata">

**Author:** ![vancleve](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vancleve/32/4183_2.png) [@vancleve](https://discourse.julialang.org/u/vancleve)\
**Post date:** [April 7, 2020, 10:45pm UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/7 "2020-04-07T22:45:00Z")

</div>

thanks!

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [April 8, 2020, 10:58pm UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/8 "2020-04-08T22:58:21Z")

</div>

Hi,

I am wondering if there is a way to specify the layer. For example, if I do the following recipe, how can I specifiy the fact that I want the scatter to be above the lines, in the foreground?

```julia
struct A end

@recipe function f(::A)
	N = 10
	x = 1:N
	y = rand(N)
	@series begin
		seriestype := :scatter
		x, y
	end
	x, y
end

plot(A())

```

Thank you,

---

<div class="post-metadata">

**Author:** ![briochemc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/briochemc/32/4209_2.png) [@briochemc](https://discourse.julialang.org/u/briochemc)\
**Post date:** [April 9, 2020, 5:41am UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/9 "2020-04-09T05:41:18Z")

</div>

> [@rveltz](#):
>
> how can I specifiy the fact that I want the scatter to be above the lines, in the foreground?

Just sort the series with the scatter last:

```julia
@recipe function f(::A)
    N = 10
    x = 1:N
    y = rand(N)
    @series begin
        x, y
    end
    @series begin
        seriestype := :scatter
        x, y
    end
end

```

* * *

**[EDIT]**: But if you just want to show markers and lines, better to just add the marker:

```julia
@recipe function f(::A)
    N = 10
    x = 1:N
    y = rand(N)
    markershape --> :circle
    x, y
end

```

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [April 9, 2020, 6:11am UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/10 "2020-04-09T06:11:16Z")

</div>

thank you.

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [April 9, 2020, 7:21am UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/11 "2020-04-09T07:21:02Z")

</div>

> [@daschw](#):
>
> @recipe function f(::Type{T}, v::T) where T \<: AbstractArray{\<:MyType}

Concerning this new signature, is there an example available?

---

<div class="post-metadata">

**Author:** ![daschw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daschw/32/2926_2.png) [@daschw](https://discourse.julialang.org/u/daschw)\
**Post date:** [April 9, 2020, 7:39am UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/12 "2020-04-09T07:39:14Z")

</div>

```julia
using Plots

struct MyType
    v::Float64
end
getval(mt) = mt.v

@recipe function f(::Type{T}, mtv::T) where T <: AbstractArray{<:MyType}
    guide --> "MyType axis"
    formatter --> x -> string("MyType(", round(x, digits = 6), ")")
    getval.(mtv)
end

```

```julia
plot(MyType.(rand(10)))

```

![mytype_1](https://global.discourse-cdn.com/julialang/original/3X/4/0/401a267860e4e402d8778cf48110b2649f6a0944.png)

```julia
plot(MyType.(1:10), rand(10))

```

![mytype_2](https://global.discourse-cdn.com/julialang/original/3X/4/8/486b5dc423b20ff6ef91ea3e11c2cf8ba5c79fae.png)

or [Implement zerror and surface type recipe fixes by daschw · Pull Request #2548 · JuliaPlots/Plots.jl · GitHub](https://github.com/JuliaPlots/Plots.jl/pull/2548#issue-400307090)

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [April 9, 2020, 7:52am UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/13 "2020-04-09T07:52:14Z")

</div>

Oh I see.

It is not what I imagined. I have a plot recipe for a `MyType` and I thought I could use the new signature to apply repeatedly the plot recipe to each element in `vecMyType::AbstractArray{MyType}` to plot inplace, by superposition of the different plots. This would avoid writing 2 separate recipes which a quite the same.

---

<div class="post-metadata">

**Author:** ![daschw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daschw/32/2926_2.png) [@daschw](https://discourse.julialang.org/u/daschw)\
**Post date:** [April 9, 2020, 8:00am UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/14 "2020-04-09T08:00:50Z")

</div>

> [@rveltz](#):
>
> to plot inplace, by superposition of the different plots

I’m sorry, I don’t really understand what you mean with this. Which 2 recipes that are almost the same would you have to write? Could you provide a MWE?

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [April 9, 2020, 9:34am UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/15 "2020-04-09T09:34:07Z")

</div>

Say I have the following recipe for a single element `a::A`:

```julia
struct A end

# this is more complex in my use case
@recipe function f(::A)
	N = 10
	x = 1:N
	y = rand(N)
	@series begin
		seriestype := :scatter
		label --> ""
		x, y
	end
	x, y
end

```

I can use this to do `plot(A())`. What I want to do it `plot([A(), A(), A()])` as a mean to

```julia
plot(A())
plot!(A())
plot!(A())

```

and I thought that `@recipe function f(::Type{T}, v::T) where T <: AbstractArray{<:MyType}` was for this.

So, I want to do something along the lines of (completely wrong)

```julia
@recipe function f(::Type{T}, myAs::T) where T <: AbstractArray{<:A}
	for res in myAs
	      f(res)
	end
end

```

If this is not possible, I will have to re-implement `@recipe function f(::Type{T}, myAs::T) where T <: AbstractArray{<:A}` and the code will look like a duplicate of `@recipe function f(::A)`.

---

<div class="post-metadata">

**Author:** ![daschw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daschw/32/2926_2.png) [@daschw](https://discourse.julialang.org/u/daschw)\
**Post date:** [April 9, 2020, 1:39pm UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/16 "2020-04-09T13:39:48Z")

</div>

OK, I see, you are using a user recipe. I’m afraid, what you want to do is in general not possible for type recipes. Type recipes are supposed to define a mapping from user defined types to data points that Plots can assign along an axis (Strings or Numbers), or types that are handled by another type recipe. New series are ignored in type recipes.  
Would a second user recipe for vectors work in your case?

```julia
@recipe function f(v::AbstractVector{<:A})
    for i in eachindex(v)
        @series begin
            A()
        end
    end
end
```

---

<div class="post-metadata">

**Author:** ![rveltz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rveltz/32/2707_2.png) [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Post date:** [April 9, 2020, 4:10pm UTC](https://discourse.julialang.org/t/ann-releasing-recipesbase-1-0-and-plots-1-0-please-read/37056/17 "2020-04-09T16:10:26Z")

</div>

I like that!! Thank you
