# Color scale for an ordered variable

**URL:** <https://discourse.julialang.org/t/color-scale-for-an-ordered-variable/33702>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [January 23, 2020, 3:22pm UTC](https://discourse.julialang.org/t/color-scale-for-an-ordered-variable/33702 "2020-01-23T15:22:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yanivab](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yanivab/32/9164_2.png) [@yanivab](https://discourse.julialang.org/u/yanivab)\
**Post date:** [January 23, 2020, 3:22pm UTC](https://discourse.julialang.org/t/color-scale-for-an-ordered-variable/33702/1 "2020-01-23T15:22:50Z")

</div>

I’m trying to make a scatter plot with marker color denoting the data session collection number.

How does one do this?

If I set group = :session, I get non sequential colours (even with, say, color\_palette = :blues):

```julia
@df dat scatter(:x, :y, yerror = :se,
    group = :session,
    color_palette = :blues)

```

If I use zcolor = :session, I get sequential colours, but the legend is a continuous color bar.

```julia
@df dat scatter(:x, :y, yerror = :se,
    zcolor = :session,
    seriescolor = :blues)

```

How can I make it an ordered categorical (since there is no session 1.5)?
