RecipesPipeline.jl

Utilities for processing recipes
Author JuliaPlots
Popularity
16 Stars
Updated Last
1 Year Ago
Started In
March 2020

WARNING: RecipesPipeline now lives in https://github.com/JuliaPlots/Plots.jl/tree/master/RecipesPipeline, please open issues here and PRs here.

RecipesPipeline

Codecov project chat

An implementation of the recipe pipeline from Plots

This package was factored out of Plots.jl to allow any other plotting package to use the recipe pipeline. In short, the extremely lightweight RecipesBase.jl package can be depended on by any package to define "recipes": plot specifications of user-defined types, as well as custom plot types. RecipePipeline.jl contains the machinery to translate these recipes to full specifications for a plot.

The package is intended to be used by consumer plotting packages, and is currently used by Plots.jl (v.1.1.0 and above) and MakieRecipes.jl, a package that bridges RecipesBase recipes to Makie.jl.

Current functionality:

using RecipesBase

# Our user-defined data type
struct T end

RecipesBase.@recipe function plot(::T, n = 1; customcolor = :green)
    seriestype --> :scatter
    markershape --> :auto        # if markershape is unset, make it :auto
    markercolor :=  customcolor  # force markercolor to be customcolor
    xrotation   --> 45           # if xrotation is unset, make it 45
    zrotation   --> 90           # if zrotation is unset, make it 90
    rand(10,n)                   # return the arguments (input data) for the next recipe
end

using Makie, MakieRecipes
recipeplot(T(), 3; markersize = 3)

Screenshot 2020-04-05 at 16 36 46