# Color gradient doesn't work

**URL:** <https://discourse.julialang.org/t/color-gradient-doesnt-work/111734>\
**Category:** General Usage\
**Tags:** colors, python, plot, pythonplot\
**Created:** [March 17, 2024, 9:10pm UTC](https://discourse.julialang.org/t/color-gradient-doesnt-work/111734 "2024-03-17T21:10:37Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Enlil50](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/enlil50/32/206539_2.png) [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Post date:** [March 17, 2024, 10:59pm UTC](https://discourse.julialang.org/t/color-gradient-doesnt-work/111734/3 "2024-03-17T22:59:15Z")

</div>

I’m specifically trying to do this:

> [@Plots.jl: Assigning seriescolor using ColorGradient for line plot](https://discourse.julialang.org/t/plots-jl-assigning-seriescolor-using-colorgradient-for-line-plot/17099/9):
>
> Eh, plot(X, palette = :inferno) is already valid Plots syntax? Note that Plots cannot know how many series you will add in the future, so when specifying a palette it will always try to select each color to be as widely spaced on the color gradient as possible. If you know you have 5 series and want them spaced on the color gradient sequentially, you can use color and spread line\_z over the 5 series: plot(rand(20,5), color = :RdYlBu, line\_z = (1:5)') You can also just supply a …

---

_[View the full topic](https://discourse.julialang.org/t/color-gradient-doesnt-work/111734)._
