# \#recipe

**URL:** https://discourse.julialang.org/tag/recipe/544.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Why do the density plots with Unitful display units on the "wrong" axis?](https://discourse.julialang.org/t/why-do-the-density-plots-with-unitful-display-units-on-the-wrong-axis/135727)

<div class="topic-metadata">

**Author:** [@bertulli](https://discourse.julialang.org/u/bertulli)\
**Replies:** 0\
**Last updated:** [February 19, 2026, 1:38pm UTC](https://discourse.julialang.org/t/why-do-the-density-plots-with-unitful-display-units-on-the-wrong-axis/135727 "2026-02-19T13:38:56Z")

</div>

Hi all! I noticed that, when plotting the probability distribution of some data with Plots.jl with density(x), the axis representing the “underlying” data, is on the x axis: using Plots using StatsPlots x = \[1,1,1,2,2\] …

---

## [\[ANN\] Biplots.jl](https://discourse.julialang.org/t/ann-biplots-jl/68520)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 4\
**Last updated:** [December 15, 2025, 11:24am UTC](https://discourse.julialang.org/t/ann-biplots-jl/68520 "2025-12-15T11:24:30Z")

</div>

Biplots were introduced in the 70s and are super useful in exploratory data analysis. Given a design matrix X or more generally a table with variable names, it produces a 2D or 3D visualization with principal axes of ali…

---

## [Makie recipes on a Errorline like plot](https://discourse.julialang.org/t/makie-recipes-on-a-errorline-like-plot/133456)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 2\
**Last updated:** [October 27, 2025, 5:31pm UTC](https://discourse.julialang.org/t/makie-recipes-on-a-errorline-like-plot/133456 "2025-10-27T17:31:50Z")

</div>

Using the new Makie 0.24 recipe system, I want to create the StatsPlots.jl recipe for errorline (see original definition). Here is a simplified version of the plume errorline. This might be very simple but could not fi…

---

## [Makie recipe and cycle colour](https://discourse.julialang.org/t/makie-recipe-and-cycle-colour/132910)

<div class="topic-metadata">

**Author:** [@matthiasbaitsch](https://discourse.julialang.org/u/matthiasbaitsch)\
**Replies:** 11\
**Last updated:** [October 6, 2025, 3:05pm UTC](https://discourse.julialang.org/t/makie-recipe-and-cycle-colour/132910 "2025-10-06T15:05:37Z")

</div>

What is a good way to cycle through plot attributes in a recipe? In the example below, the first plot should use the same colours as second. using Makie using CairoMakie # Recipe @recipe TestPlot begin end function Ma…

---

## [Makie.jl keyword argument recipes (v0.24)](https://discourse.julialang.org/t/makie-jl-keyword-argument-recipes-v0-24/132603)

<div class="topic-metadata">

**Author:** [@jrbaxter0](https://discourse.julialang.org/u/jrbaxter0)\
**Replies:** 5\
**Last updated:** [September 24, 2025, 1:43pm UTC](https://discourse.julialang.org/t/makie-jl-keyword-argument-recipes-v0-24/132603 "2025-09-24T13:43:19Z")

</div>

I would like to request some help updating some of my plotting recipes to the new v0.24 style. I know the issue lies with the new attribute system and the computational graph (and no longer being able to manipulate it li…

---

## [Proper Makie.jl recipe usage](https://discourse.julialang.org/t/proper-makie-jl-recipe-usage/132502)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 7\
**Last updated:** [September 21, 2025, 12:11pm UTC](https://discourse.julialang.org/t/proper-makie-jl-recipe-usage/132502 "2025-09-21T12:11:36Z")

</div>

This is the first time I am writing a recipe and I am a bit lost in all the options. Basically I want to have a few convenient plotting functions for a package I am working on. It calculates solar positions, which are ju…

---

## [Animation keeps changing xlims ylims](https://discourse.julialang.org/t/animation-keeps-changing-xlims-ylims/131181)

<div class="topic-metadata">

**Author:** [@Leibniz](https://discourse.julialang.org/u/Leibniz)\
**Replies:** 2\
**Last updated:** [July 29, 2025, 6:31pm UTC](https://discourse.julialang.org/t/animation-keeps-changing-xlims-ylims/131181 "2025-07-29T18:31:05Z")

</div>

Greetings, I have been struggling for hours to create an animation (particles in a box) where the xlims and ylims of the plot window remain fixed during the run. @userplot SystemPlot @recipe function f(sp::SystemPlo…

---

## [Attributes group in RecipesBase](https://discourse.julialang.org/t/attributes-group-in-recipesbase/46809)

<div class="topic-metadata">

**Author:** [@matthieu](https://discourse.julialang.org/u/matthieu)\
**Replies:** 1\
**Last updated:** [March 16, 2025, 12:28pm UTC](https://discourse.julialang.org/t/attributes-group-in-recipesbase/46809 "2025-03-16T12:28:58Z")

</div>

I am trying to set the attribute group for a recipe in Recipes Base.jl. However, it looks like the attribute group is ignored using RecipesBase, Plots @userplot MyPlot @recipe function f(bs::MyPlot) group := bs.args…

---

## [Incorrect mean in the EnsembleSummary plot?](https://discourse.julialang.org/t/incorrect-mean-in-the-ensemblesummary-plot/125325)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 1\
**Last updated:** [January 29, 2025, 5:51pm UTC](https://discourse.julialang.org/t/incorrect-mean-in-the-ensemblesummary-plot/125325 "2025-01-29T17:51:48Z")

</div>

I have the following snippet: module mwe using OrdinaryDiffEq using Plots using Distributions using Statistics tspan = (0.0, 10.0) Δt = 0.5 g(u, p, t) = p\[1\] \* t x0 = 0.0 # base problem prob\_x = ODEProblem(g, x0, tsp…

---

## [Makie recipe to plot ODESolution of DifferentialEquations.jl?](https://discourse.julialang.org/t/makie-recipe-to-plot-odesolution-of-differentialequations-jl/105879)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 11\
**Last updated:** [January 23, 2025, 12:28am UTC](https://discourse.julialang.org/t/makie-recipe-to-plot-odesolution-of-differentialequations-jl/105879 "2025-01-23T00:28:55Z")

</div>

Related to this question. Is there a recipe to plot the DiffEq solution components against time? I tried Makie.convert\_arguments(sol::ODESolution) = (sol.t, \[\[v\[1\] for v in sol.u\], \[\[v\[2\] for v in sol.u\]\]\]) but it pl…

---

## [Are recipes still an "advanced topic"?](https://discourse.julialang.org/t/are-recipes-still-an-advanced-topic/124217)

<div class="topic-metadata">

**Author:** [@Ken\_Williams](https://discourse.julialang.org/u/Ken_Williams)\
**Replies:** 6\
**Last updated:** [December 31, 2024, 11:47pm UTC](https://discourse.julialang.org/t/are-recipes-still-an-advanced-topic/124217 "2024-12-31T23:47:10Z")

</div>

I was recently trying to figure out how to let users of my code make some plots, without making Plots.jl (and its hefty list of dependencies) a dependency of the package. Recipes seem like they’re aimed at this use case…

---

## [Accessing axis in Makie plot recipes](https://discourse.julialang.org/t/accessing-axis-in-makie-plot-recipes/66006)

<div class="topic-metadata">

**Author:** [@jlchan](https://discourse.julialang.org/u/jlchan)\
**Replies:** 5\
**Last updated:** [November 24, 2024, 9:18am UTC](https://discourse.julialang.org/t/accessing-axis-in-makie-plot-recipes/66006 "2024-11-24T09:18:18Z")

</div>

Is there a way to access the axis in a Makie plot recipe? I’d like to apply xlims!(ax, ...) and set ax.aspect = .....

---

## [Calling multiple user plot recipes from single recipe](https://discourse.julialang.org/t/calling-multiple-user-plot-recipes-from-single-recipe/122885)

<div class="topic-metadata">

**Author:** [@Ickaser](https://discourse.julialang.org/u/Ickaser)\
**Replies:** 3\
**Last updated:** [November 21, 2024, 7:28pm UTC](https://discourse.julialang.org/t/calling-multiple-user-plot-recipes-from-single-recipe/122885 "2024-11-21T19:28:40Z")

</div>

I am building a suite of Plots.jl recipes for my common visualizations, which has been very helpful–this functionality is awesome. I’ve arrived at a point where I would like to compose multiple of my user recipes in a s…

---

## [Makie recipe with multiple axes](https://discourse.julialang.org/t/makie-recipe-with-multiple-axes/121013)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 4\
**Last updated:** [October 7, 2024, 4:13pm UTC](https://discourse.julialang.org/t/makie-recipe-with-multiple-axes/121013 "2024-10-07T16:13:15Z")

</div>

Is it currently possible to define a recipe with multiple axes in Makie.jl? Say I have a full recipe called MyPlot that acts on a type T, I want the call myplot(obj::T) to return a figure with 2x2 grid layout filled with…

---

## [Makie and Plots recipes](https://discourse.julialang.org/t/makie-and-plots-recipes/119023)

<div class="topic-metadata">

**Author:** [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Replies:** 4\
**Last updated:** [September 4, 2024, 10:54am UTC](https://discourse.julialang.org/t/makie-and-plots-recipes/119023 "2024-09-04T10:54:13Z")

</div>

I’ve got an old package (TreatmentPanels.jl) to wrangle data sets into shape for specific use cases in other packages, and as part of this have defined some Plots.jl recipes to visualise the data. Over the last year or …

---

## [Modifying the legend of a plot with a colorbar](https://discourse.julialang.org/t/modifying-the-legend-of-a-plot-with-a-colorbar/117153)

<div class="topic-metadata">

**Author:** [@prconlin](https://discourse.julialang.org/u/prconlin)\
**Replies:** 2\
**Last updated:** [July 17, 2024, 6:04pm UTC](https://discourse.julialang.org/t/modifying-the-legend-of-a-plot-with-a-colorbar/117153 "2024-07-17T18:04:44Z")

</div>

Hello, I’m trying to modify the legend of this plot: The plot represents a random walk, which is simply a series of (x,y) coordinates. To indicate position vs time, I applied a gradient color scale to the line using…

---

## [Update an external Observable in Makie recipe](https://discourse.julialang.org/t/update-an-external-observable-in-makie-recipe/116617)

<div class="topic-metadata">

**Author:** [@NicoD](https://discourse.julialang.org/u/NicoD)\
**Replies:** 2\
**Last updated:** [July 4, 2024, 12:17pm UTC](https://discourse.julialang.org/t/update-an-external-observable-in-makie-recipe/116617 "2024-07-04T12:17:35Z")

</div>

In Julia, an observable can be passed as argument to a function, and when the function updates its value, the changes are visible from outside the function (the observable declared outside is updated). Simple working ex…

---

## [Is there a simpler way to plot less points?](https://discourse.julialang.org/t/is-there-a-simpler-way-to-plot-less-points/75786)

<div class="topic-metadata">

**Author:** [@Fred\_He](https://discourse.julialang.org/u/Fred_He)\
**Replies:** 12\
**Last updated:** [July 3, 2024, 1:29pm UTC](https://discourse.julialang.org/t/is-there-a-simpler-way-to-plot-less-points/75786 "2024-07-03T13:29:25Z")

</div>

I have a solution for PDE with a lot of points. Is there any keyword in Plots.jl that can directly easily plot fewer points? If not, maybe we can manage to add one?

---

## [How to modify the axis in a recipe](https://discourse.julialang.org/t/how-to-modify-the-axis-in-a-recipe/116405)

<div class="topic-metadata">

**Author:** [@Jeff\_Wack](https://discourse.julialang.org/u/Jeff_Wack)\
**Replies:** 1\
**Last updated:** [July 3, 2024, 8:22am UTC](https://discourse.julialang.org/t/how-to-modify-the-axis-in-a-recipe/116405 "2024-07-03T08:22:49Z")

</div>

I am trying to create a Makie recipe to make a plot from a custom datatype. In these plots I would like to have a completely blank white background, in other words have no visible axis. Normally to make a plot like this…

---

## [Plot recipe that performs multiple plot calls](https://discourse.julialang.org/t/plot-recipe-that-performs-multiple-plot-calls/114944)

<div class="topic-metadata">

**Author:** [@kirklong](https://discourse.julialang.org/u/kirklong)\
**Replies:** 1\
**Last updated:** [May 30, 2024, 5:44pm UTC](https://discourse.julialang.org/t/plot-recipe-that-performs-multiple-plot-calls/114944 "2024-05-30T17:44:38Z")

</div>

I am trying to define a recipe for a custom type. I have gotten a basic thing to work using the @userplot macro and following some examples, but I want to extend this to allow the recipe to do what would be multiple plot…

---

## [How to do "reactive conditional plotting" in Makie recipes?](https://discourse.julialang.org/t/how-to-do-reactive-conditional-plotting-in-makie-recipes/112871)

<div class="topic-metadata">

**Author:** [@eliascarv](https://discourse.julialang.org/u/eliascarv)\
**Replies:** 6\
**Last updated:** [April 12, 2024, 8:00pm UTC](https://discourse.julialang.org/t/how-to-do-reactive-conditional-plotting-in-makie-recipes/112871 "2024-04-12T20:00:26Z")

</div>

I want to show a plot in the recipe if any condition is true and do something else otherwise, maybe another plot, or do nothing in the case of my MWE. How can I do this in Makie recipes? MWE: using Makie using GLMakie…

---

## [Makie diffeq recipes](https://discourse.julialang.org/t/makie-diffeq-recipes/110078)

<div class="topic-metadata">

**Author:** [@henry2004y](https://discourse.julialang.org/u/henry2004y)\
**Replies:** 0\
**Last updated:** [February 11, 2024, 7:57pm UTC](https://discourse.julialang.org/t/makie-diffeq-recipes/110078 "2024-02-11T19:57:57Z")

</div>

Recently a new Makie recipe for DifferentialEquations was added using PlotSpec. However, I noticed that at least two things are not working: Line attributes are ignored. For example, linestyle and linewidth are always …

---

## [Set the same colour for every \`@series\` in a loop of a plot recipe](https://discourse.julialang.org/t/set-the-same-colour-for-every-series-in-a-loop-of-a-plot-recipe/105117)

<div class="topic-metadata">

**Author:** [@giancarloantonucci](https://discourse.julialang.org/u/giancarloantonucci)\
**Replies:** 0\
**Last updated:** [October 18, 2023, 12:16pm UTC](https://discourse.julialang.org/t/set-the-same-colour-for-every-series-in-a-loop-of-a-plot-recipe/105117 "2023-10-18T12:16:36Z")

</div>

Take the following dummy plot-recipe: using Plots struct Example end @recipe function f(ex::Example) @series begin seriescolor --\> 1 \[1:10, 1:10\] end for n in 1:10 @series begin …

---

## [When using seriestype=:scatter, create individual labels for each dot?](https://discourse.julialang.org/t/when-using-seriestype-scatter-create-individual-labels-for-each-dot/104233)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 5\
**Last updated:** [September 26, 2023, 3:50pm UTC](https://discourse.julialang.org/t/when-using-seriestype-scatter-create-individual-labels-for-each-dot/104233 "2023-09-26T15:50:29Z")

</div>

I am using Plot recipes to create a plot overload for a special type of input. The result is a scatter plot with something like: @recipe function f(ms::MyStruct) seriestype --\> :scatter ms.x\_vals, ms.y\_vals end…

---

## [Synchronizing Colors for Functions and Derivatives in Julia Plots using RecipesBase.jl](https://discourse.julialang.org/t/synchronizing-colors-for-functions-and-derivatives-in-julia-plots-using-recipesbase-jl/103939)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 0\
**Last updated:** [September 17, 2023, 1:44am UTC](https://discourse.julialang.org/t/synchronizing-colors-for-functions-and-derivatives-in-julia-plots-using-recipesbase-jl/103939 "2023-09-17T01:44:11Z")

</div>

I’m working with Julia and the Plots.jl package to create subplots of functions and their derivatives, and I want to synchronize the colors between corresponding functions and their derivatives using RecipesBase.jl . Her…

---

## [What if we have one type recipe for the x-axis and one for the y-axis?](https://discourse.julialang.org/t/what-if-we-have-one-type-recipe-for-the-x-axis-and-one-for-the-y-axis/93563)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 1\
**Last updated:** [August 31, 2023, 9:26pm UTC](https://discourse.julialang.org/t/what-if-we-have-one-type-recipe-for-the-x-axis-and-one-for-the-y-axis/93563 "2023-08-31T21:26:17Z")

</div>

If we define a type recipe for MyWrapper which is the independent variable (x) and one type recipe for MyOtherWrapper which is the dependent variable (y). It seems that the plot attributes defined in MyWrapper are prefer…

---

## [Line labels in subplot impacted by other subplots](https://discourse.julialang.org/t/line-labels-in-subplot-impacted-by-other-subplots/102924)

<div class="topic-metadata">

**Author:** [@markowkes](https://discourse.julialang.org/u/markowkes)\
**Replies:** 1\
**Last updated:** [August 17, 2023, 9:58pm UTC](https://discourse.julialang.org/t/line-labels-in-subplot-impacted-by-other-subplots/102924 "2023-08-17T21:58:54Z")

</div>

I have a plot recipe that creates a few subplots. However, the labels that are displayed in the legend are not in the correct order in some cases and I do not understand what is wrong. For example, in this MWE, the fun…

---

## [Makie - Example of simple type recipe not working](https://discourse.julialang.org/t/makie-example-of-simple-type-recipe-not-working/102049)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 10\
**Last updated:** [July 26, 2023, 12:43am UTC](https://discourse.julialang.org/t/makie-example-of-simple-type-recipe-not-working/102049 "2023-07-26T00:43:27Z")

</div>

The docs explain how to write “type recipes”. Can you please provide a MWE with a completely new type? As you can see below, just following the instructions in the docs leads to errors: import Makie # custom type struc…

---

## [How to make plot! work with new plot method](https://discourse.julialang.org/t/how-to-make-plot-work-with-new-plot-method/101621)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 1\
**Last updated:** [July 14, 2023, 1:09pm UTC](https://discourse.julialang.org/t/how-to-make-plot-work-with-new-plot-method/101621 "2023-07-14T13:09:22Z")

</div>

Hello, I added new methods for plot and histogram to work with a custom type. Both methods work in isolation, but I cannot combine them by calling plot and then histogram! for example. How can I allow plot! and histogra…

---

## [Write a plot recipe that uses other recipes to generate data for several plots](https://discourse.julialang.org/t/write-a-plot-recipe-that-uses-other-recipes-to-generate-data-for-several-plots/100015)

<div class="topic-metadata">

**Author:** [@claud10c](https://discourse.julialang.org/u/claud10c)\
**Replies:** 2\
**Last updated:** [June 7, 2023, 6:47pm UTC](https://discourse.julialang.org/t/write-a-plot-recipe-that-uses-other-recipes-to-generate-data-for-several-plots/100015 "2023-06-07T18:47:43Z")

</div>

I have the following code (here is a minimal working example) in Julia: using Plots using LazySets gr() struct Data pos::Matrix{Float64} # Positions in an Euclidean plane snodes::Vector{Vector{Int64}} # Set of …

[Next page](https://discourse.julialang.org/tag/recipe/544.md?match_all_tags=true&page=1&tags%5B%5D=recipe)
