# How to modify the axis in a recipe

**URL:** <https://discourse.julialang.org/t/how-to-modify-the-axis-in-a-recipe/116405>\
**Category:** Visualization\
**Tags:** question, plotting, makie, recipe\
**Created:** [June 30, 2024, 2:02am UTC](https://discourse.julialang.org/t/how-to-modify-the-axis-in-a-recipe/116405 "2024-06-30T02:02:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Wack](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@Jeff\_Wack](https://discourse.julialang.org/u/Jeff_Wack)\
**Post date:** [June 30, 2024, 2:02am UTC](https://discourse.julialang.org/t/how-to-modify-the-axis-in-a-recipe/116405/1 "2024-06-30T02:02:37Z")

</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 I would use

> hidespines!(ax)  
> hidedecorations!(ax)

but I cannot figure out how to achieve this from within a recipe. I am wondering if something like this:

> using CairoMakie
> 
> @recipe(MyPlot,x,y) do scene  
> Theme(  
> plot\_color = :red  
> )  
> end
> 
> function Makie.plot!(p::MyPlot)  
> scatter!(p,p[1],p[2],color = p.plot\_color)  
> ax = current\_axis(p)  
> hidedecorations!(ax)  
> hidespines!(ax)  
> end
> 
> myplot([1,2],[3,4])

could work?

---

<div class="post-metadata">

**Author:** ![Jeff\_Wack](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@Jeff\_Wack](https://discourse.julialang.org/u/Jeff_Wack)\
**Post date:** [July 3, 2024, 8:22am UTC](https://discourse.julialang.org/t/how-to-modify-the-axis-in-a-recipe/116405/2 "2024-07-03T08:22:49Z")

</div>

My current thought is that I’m best off defining a function with the following signature:

> myplot!(scene, thing::MyType)  
> …  
> scatter!(scene,somepoints)  
> lines!(scene,somelines)  
> return scene

What do recipes do differently? I can see that my plotting function here will not pass kwargs to the inner function calls unless I describe this. Is this what the @recipe macro does? What is the role of the plot type?
