# \[Makie.jl\] Changing axes font sizes on 3D plots like surface

**URL:** <https://discourse.julialang.org/t/makie-jl-changing-axes-font-sizes-on-3d-plots-like-surface/76495>\
**Category:** Visualization\
**Tags:** makie, 3d\
**Created:** [February 15, 2022, 5:10pm UTC](https://discourse.julialang.org/t/makie-jl-changing-axes-font-sizes-on-3d-plots-like-surface/76495 "2022-02-15T17:10:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KirillGerke](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kirillgerke/32/11383_2.png) [@KirillGerke](https://discourse.julialang.org/u/KirillGerke)\
**Post date:** [February 15, 2022, 5:10pm UTC](https://discourse.julialang.org/t/makie-jl-changing-axes-font-sizes-on-3d-plots-like-surface/76495/1 "2022-02-15T17:10:55Z")

</div>

Dear All,  
While Makie.jl’s documentation and some threads here suggest using functions like the following:

```julia
fontsize_theme = Theme(fontsize = 30)
set_theme!(fontsize_theme)
update_theme!(fontsize = 36)

```

they work just fine only for 2D plots. What i am trying to do is to change the font size for 3D surface plots, for example using this code snippet here ([surface](https://makie.juliaplots.org/stable/examples/plotting_functions/surface/#generic_3d)):

```julia
using SparseArrays
using LinearAlgebra
using GLMakie

# This example was provided by Moritz Schauer (@mschauer).

function gridlaplacian(m, n)
    S = sparse(0.0I, n*m, n*m)
    linear = LinearIndices((1:m, 1:n))
    for i in 1:m
        for j in 1:n
            for (i2, j2) in ((i + 1, j), (i, j + 1))
                if i2 <= m && j2 <= n
                    S[linear[i, j], linear[i2, j2]] -= 1
                    S[linear[i2, j2], linear[i, j]] -= 1
                    S[linear[i, j], linear[i, j]] += 1
                    S[linear[i2, j2], linear[i2, j2]] += 1
                end
            end
        end
    end
    return S
end

# d is used to denote the size of the data
d = 150

 # Sample centered Gaussian noise with the right correlation by the method
 # based on the Cholesky decomposition of the precision matrix
data = 0.1randn(d,d) + reshape(
        cholesky(gridlaplacian(d,d) + 0.003I) \ randn(d*d),
        d, d)

#Any additions with the functions from the above snippet do not work here, just putting some of the examples below (around the surface function):
fontsize_theme = Theme(fontsize = 30)
set_theme!(fontsize_theme)
surface(data; shading=false, colormap = :deep)
update_theme!(fontsize = 36)

```

I would be grateful for any solution for this problem, as i am trying to use Makie.jl for manuscript production graphs (i don’t want to go back to Plots.jl for that…).  
Many thanks in advance!  
Kirill

---

<div class="post-metadata">

**Author:** ![lazarusA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lazarusa/32/6571_2.png) [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Post date:** [February 15, 2022, 7:21pm UTC](https://discourse.julialang.org/t/makie-jl-changing-axes-font-sizes-on-3d-plots-like-surface/76495/2 "2022-02-15T19:21:37Z")

</div>

you could always go back to the OldAxis…

```julia
axis = ax.scene[OldAxis]

```

see example

> **[Jupyter Notebook Viewer](https://nbviewer.org/github/lazarusA/MakieNotebooks/blob/main/Makie3D_sphere.ipynb)**
>
> Check out this Jupyter notebook!

---

<div class="post-metadata">

**Author:** ![KirillGerke](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kirillgerke/32/11383_2.png) [@KirillGerke](https://discourse.julialang.org/u/KirillGerke)\
**Post date:** [February 19, 2022, 3:06pm UTC](https://discourse.julialang.org/t/makie-jl-changing-axes-font-sizes-on-3d-plots-like-surface/76495/3 "2022-02-19T15:06:12Z")

</div>

Thank you a lot, Lázaro!  
It did help and now i got some nice figures. You provided a solution.  
However, i hit another wall) Will likely post another question om Makie.jl soon enough:)
