# Current list of colorschemes in Plots.jl

**URL:** <https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420>\
**Category:** Visualization\
**Tags:** question, plotting\
**Created:** [August 17, 2017, 5:18am UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420 "2017-08-17T05:18:59Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [March 8, 2018, 10:15am UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420/21 "2018-03-08T10:15:21Z")

</div>

Thanks, piever: first trick (line\_z) helps!

Second answer – maybe I was not clear… What I meant is: consider a surface plot of the Rosenbrock function:

function rosenbrock(x,y)  
return (1-x)^2 + 100\*(y-x^2)^2  
end

## 

x = linspace(-2,2)  
y = linspace(-1,3)

# 

plot(x,y,rosenbrock,st=:surface)

a: I want to _add_ contour lines in the plot (that used to be possible, but I cannot find the keyword now (i.e., instead of “:surface”)

b: Often, the surface + contour plots don’t show off so well – typically when the surface hides the contours. So – how can I _offset_ the z-position of the contours from z=0 to, say, z = -500?

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [March 8, 2018, 5:36pm UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420/22 "2018-03-08T17:36:14Z")

</div>

> “Concerning layout, this tutorial (3) may be helpful.”

My question was related to this tutorial, I guess… which says:

"The @layout macro is the easiest way to define complex layouts, using Julia’s multidimensional Array construction as the basis for a custom layout syntax. Precise sizing can be acheived with curly brackets, otherwise the free space is equally split between the plot areas of subplots.

l = @layout [ a{0.3w} [grid(3,3)  
b{0.2h} ]]  
plot(  
rand(10,11),  
layout = l, legend = false, seriestype = [:bar :scatter :path],  
title = [“($i)” for j = 1:1, i=1:11], titleloc = :right, titlefont = font(8)  
)"

However, the tutorial does not state the meaning of “a” and “b” in the constructs " a{0.3w}" and “b{0.2h}”. My question is on what these mean. [I can guess, but perhaps it should not be necessary to guess??]

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [March 8, 2018, 5:48pm UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420/23 "2018-03-08T17:48:04Z")

</div>

Btw: how can I define my own “color gradient”/“color library”? For some plots, I’d like to use the color scheme of my employer…

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [March 8, 2018, 6:24pm UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420/24 "2018-03-08T18:24:46Z")

</div>

`cgrad(vector_of_colors)`. Isn’t that in the docs?

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [March 8, 2018, 7:43pm UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420/25 "2018-03-08T19:43:34Z")

</div>

Possibly in the docs. I find the docs quite useful, but I don’t find them particularly systematic and easy to get around in.

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [March 8, 2018, 8:02pm UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420/26 "2018-03-08T20:02:48Z")

</div>

There’s a suggestion for a new structure here: [https://github.com/JuliaPlots/PlotDocs.jl/issues/71](https://github.com/JuliaPlots/PlotDocs.jl/issues/71)  
You’d be very welcome to add feedback and ideas.

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [March 9, 2018, 7:51am UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420/27 "2018-03-09T07:51:32Z")

</div>

OK – I’ll take a look at it. Personally, I like to print a pdf manual over using a web based tool; to me, that helps in learning. But others may feel differently. I will look over my private notes on Matplotlib/PyPlot from when I focused on Python, and see how my experience from that period can be useful in the Plots documentation structure. It will take a couple of weeks to summarize my thoughts, though.

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [March 9, 2018, 9:42am UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420/28 "2018-03-09T09:42:35Z")

</div>

Great! Even if we do act on the issue on the meantime your thoughts would be very welcome.

---

<div class="post-metadata">

**Author:** ![kapple](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kapple/32/218915_2.png) [@kapple](https://discourse.julialang.org/u/kapple)\
**Post date:** [September 10, 2020, 10:12am UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420/29 "2020-09-10T10:12:56Z")

</div>

> [@mkborregaard](#):
>
> I should add that you can reverse any color gradient by appending “\_r”, e.g. `:viridis_r` .

Hi @mkborregaard, great guide!

For the colormap `:jet` there isn’t a reversed version `:jet_r`. Please advise?

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [September 10, 2020, 10:37am UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420/30 "2020-09-10T10:37:52Z")

</div>

Since you are asking me to advise, I will :-). Don’t use jet! It doesn’t have good properties for scientific visualization. Use a colorscheme that has.  
But to answer your question, you do `cgrad(:jet, reverse = true)` today. The docs are massively improved today, btw [ColorSchemes · Plots](https://docs.juliaplots.org/latest/generated/colorschemes/)

---

<div class="post-metadata">

**Author:** ![kapple](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kapple/32/218915_2.png) [@kapple](https://discourse.julialang.org/u/kapple)\
**Post date:** [September 10, 2020, 10:54am UTC](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420/31 "2020-09-10T10:54:32Z")

</div>

Thank you! Such a fast reply, wow.

Haha, well I should’ve been more polite and addressed it to everyone/anyone who knows.

Mind you (and everyone), taking @mkborregaard’s advice and digging into the documentation, when plotting `contour`s using `seriescolor` it has to be

`seriescolor = cgrad(:jet, rev = true)`

with `rev = true` instead of `reverse = true` which doesn’t work.

Thanks for your help @mkborregaard!

[Previous page](https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420.md?page=1)
