# \[Makie\] Get current theme

**URL:** <https://discourse.julialang.org/t/makie-get-current-theme/81564>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [May 24, 2022, 9:22am UTC](https://discourse.julialang.org/t/makie-get-current-theme/81564 "2022-05-24T09:22:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [May 24, 2022, 9:22am UTC](https://discourse.julialang.org/t/makie-get-current-theme/81564/1 "2022-05-24T09:22:11Z")

</div>

When using `with_theme`, the first argument is a theme, and keyword arguments modify the given theme. This is great if I have a variable bound to the current theme, and I want to make a modification to it only for the following block. But I do **not** have a variable bound to the current theme.

Is there a way to get a handle to the current theme? Something like `current_figure` and `current_axis`, just for theme.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [May 24, 2022, 10:14am UTC](https://discourse.julialang.org/t/makie-get-current-theme/81564/2 "2022-05-24T10:14:54Z")

</div>

I think it’s Makie.current\_default\_theme()

---

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [May 24, 2022, 10:47am UTC](https://discourse.julialang.org/t/makie-get-current-theme/81564/3 "2022-05-24T10:47:14Z")

</div>

It is, thanks!

I searched through the name of exported names of GLMakie for “theme”, and ofc did not find anything. Perhaps this should be documented in the theming section, and in the docstring for `with_theme`?

---

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [May 25, 2022, 1:55pm UTC](https://discourse.julialang.org/t/makie-get-current-theme/81564/4 "2022-05-25T13:55:38Z")

</div>

Or how about making `Makie.current_default_theme()` the default theme (first argument to `with_theme`) if none is provided? This would provide a seamless interface to making adjustments on the current theme for a given group of plots.

---

<div class="post-metadata">

**Author:** ![rashid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rashid/32/9398_2.png) [@rashid](https://discourse.julialang.org/u/rashid)\
**Post date:** [August 13, 2024, 7:03am UTC](https://discourse.julialang.org/t/makie-get-current-theme/81564/5 "2024-08-13T07:03:35Z")

</div>

For some reason, the following was not updating the current\_theme:

```julia
with_theme(Makie.current_default_theme(); fontsize=20) do
	scatter(1:10, 2:2:20)
end

```

Instead I had to:

```julia
theme = Dict(Makie.current_default_theme())
theme[:fontsize] = 20
	
with_theme(; theme...) do
	scatter(1:10, 2:2:20)
end

```
