# Accessing axis in Makie plot recipes

**URL:** <https://discourse.julialang.org/t/accessing-axis-in-makie-plot-recipes/66006>\
**Category:** Visualization\
**Tags:** makie, recipe\
**Created:** [August 8, 2021, 1:51am UTC](https://discourse.julialang.org/t/accessing-axis-in-makie-plot-recipes/66006 "2021-08-08T01:51:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Krastanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/krastanov/32/6817_2.png) [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Post date:** [August 9, 2021, 5:09am UTC](https://discourse.julialang.org/t/accessing-axis-in-makie-plot-recipes/66006/3 "2021-08-09T05:09:01Z")

</div>

What about just applying a theme to the Axis, not a full programmatic access to it? For instance, I was hoping that in this recipe the newly created Axis would have a certain background color, etc, but it seems the theme information was not used in any way.

```julia
struct TestStruct
    data
end

ts = TestStruct([1,2,3])

@recipe(TestRecipe) do scene
    Theme(
    Axis = (
        backgroundcolor = :gray90,
        leftspinevisible = false,
        rightspinevisible = false,
        bottomspinevisible = false,
        topspinevisible = false,
        xgridcolor = :white,
        ygridcolor = :white,
    )
    )
end

function Makie.plot!(tr::TestRecipe{<:Tuple{TestStruct}})
    data = tr[1][].data
    scatter!(tr, data, data*2)
    tr
end

testrecipe(ts)

```

---

_[View the full topic](https://discourse.julialang.org/t/accessing-axis-in-makie-plot-recipes/66006)._
