# Makie - Cycle colors for all plots

**URL:** <https://discourse.julialang.org/t/makie-cycle-colors-for-all-plots/69033>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [October 1, 2021, 8:53am UTC](https://discourse.julialang.org/t/makie-cycle-colors-for-all-plots/69033 "2021-10-01T08:53:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nandoconde](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nandoconde/32/19497_2.png) [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Post date:** [October 1, 2021, 8:53am UTC](https://discourse.julialang.org/t/makie-cycle-colors-for-all-plots/69033/1 "2021-10-01T08:53:41Z")

</div>

Hello!

I am trying to substitute the current color cycle by one of my own, but I am not able to do so.

I have tried `set_theme!(palette = (color = cgrad(:roma, 4, categorical = true)))` and `Axis(palette = (color = cgrad(:roma, 4, categorical = true)))', but both error.

My workaround is to have the `cgrad` object and cycle manually.  
Is there an automatic way to do this?

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [October 1, 2021, 9:34am UTC](https://discourse.julialang.org/t/makie-cycle-colors-for-all-plots/69033/2 "2021-10-01T09:34:04Z")

</div>

You’re forgetting commas in the one element named tuples, so it gets parsed just as `(...)`. For set theme you need to put it under `Axis`…So:

```julia
grad = cgrad(:roma, 4, categorical = true)
set_theme!(Axis = (palette = (color = grad,),))
 Axis(palette = (color = grad,))

```

---

<div class="post-metadata">

**Author:** ![nandoconde](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nandoconde/32/19497_2.png) [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Post date:** [October 1, 2021, 9:39am UTC](https://discourse.julialang.org/t/makie-cycle-colors-for-all-plots/69033/3 "2021-10-01T09:39:00Z")

</div>

That comma… It gets me every time.

I’m sorry, thanks a lot for the help!!

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [October 1, 2021, 9:45am UTC](https://discourse.julialang.org/t/makie-cycle-colors-for-all-plots/69033/4 "2021-10-01T09:45:39Z")

</div>

Surely doesn’t help, that Makie still doesn’t throw good errors for wrong arguments…

---

<div class="post-metadata">

**Author:** ![nandoconde](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nandoconde/32/19497_2.png) [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Post date:** [October 1, 2021, 11:01am UTC](https://discourse.julialang.org/t/makie-cycle-colors-for-all-plots/69033/5 "2021-10-01T11:01:11Z")

</div>

Everything in its own due time 😉

Makie is great, keep up with the good job!
