# Apply colorscheme palette by classes

**URL:** https://discourse.julialang.org/t/apply-colorscheme-palette-by-classes/99809
**Category:** General Usage
**Tags:** plotting, color-theme
**Created:** [June 3, 2023, 1:32pm UTC](https://discourse.julialang.org/t/apply-colorscheme-palette-by-classes/99809 "2023-06-03T13:32:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ordens\_Ritter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ordens_ritter/32/50363_2.png) [@Ordens\_Ritter](https://discourse.julialang.org/u/Ordens_Ritter)
#### Post date: [June 3, 2023, 1:32pm UTC](https://discourse.julialang.org/t/apply-colorscheme-palette-by-classes/99809/1 "2023-06-03T13:32:58Z")

</div>

I am using a statsplot and I want to use the palette parameter to give every run of an measurement a different color as an classifier. Which works. But Instead to use the colors of the space for all measurements, the `viridis`colorscheme does repeat itself.  
On the other hand when I apply `:viridis` without cgrad It only changes the colors slightly.

The dataframe consists of runs 0…12, temperatures T1 21 to about 70 °C and `time` arelinux system timestamps.

```julia
@df static_df plot(:time, [:T1], group = Int.(static_df.run) .+ 1, legend = :topright,
        xlabel = "time ∖s", ylabel = L"\vartheta ∖°C",
        title = "Heating Curves", lw = 4, fmt = :png,
        palette=cgrad(:viridis, rev=true, categorical = true),)

```
