# Plots ColorSchemes issues

**URL:** <https://discourse.julialang.org/t/plots-colorschemes-issues/61670>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [May 23, 2021, 8:22am UTC](https://discourse.julialang.org/t/plots-colorschemes-issues/61670 "2021-05-23T08:22:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![weymouth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/weymouth/32/15839_2.png) [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Post date:** [May 23, 2021, 8:22am UTC](https://discourse.julialang.org/t/plots-colorschemes-issues/61670/1 "2021-05-23T08:22:17Z")

</div>

I’m trying to debug a shifty little plotting issue. [Plotting gif of examples seems broken · Issue #15 · weymouth/WaterLily.jl · GitHub](https://github.com/weymouth/WaterLily.jl/issues/15)

The root cause seems to be inconsistent behaviour for `palette()` (but I might be wrong on that).

```julia
using Plots
Plots.GRBackend()

function f(x, y)
	r = sqrt(x^2 + y^2)
	return cos(r) / (1 + r)
end
x = range(0, 2π, length = 30)
pal = palette(:RdBu_11)
contour(x, x, f, fill=(true,pal))

```

This works fine for me from the REPL, but when I use Pluto (and it seems when the user above uses the REPL) it throws an error

```julia
MethodError: no method matching _as_gradient(::Array{ColorTypes.RGBA{Float64},1})

Closest candidates are:

_as_gradient(!Matched::PlotUtils.ColorGradient) at /Users/weymouth/.julia/packages/Plots/8GUYs/src/utils.jl:136

_as_gradient(!Matched::ColorTypes.Colorant) at /Users/weymouth/.julia/packages/Plots/8GUYs/src/utils.jl:137

```

Any idea how to work around this?

---

<div class="post-metadata">

**Author:** ![ptoche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ptoche/32/23554_2.png) [@ptoche](https://discourse.julialang.org/u/ptoche)\
**Post date:** [May 23, 2021, 10:41am UTC](https://discourse.julialang.org/t/plots-colorschemes-issues/61670/2 "2021-05-23T10:41:05Z")

</div>

Not sure if this is helpful, but here’s what I get in the `REPL`:

```
julia> contour(x, x, f, fill=(true,pal))
┌ Warning: GR: filled contour only supported with black contour lines
└ @ Plots ~/.julia/packages/Plots/vVVub/src/backends/gr.jl:1808

```

 ![a](https://global.discourse-cdn.com/julialang/original/3X/a/d/add79b45c4eafc14c68b1ae4d93b83a73567420a.png)

```
julia> Pkg.status("Plots")
      Status `~/Julia/workspace/Project.toml`
  [91a5bcdd] Plots v1.14.0

julia> Pkg.status("GR")
      Status `~/Julia/workspace/Project.toml`
  [28b8d3ca] GR v0.57.4

```

And with `Pluto` (browser: Firefox), this:

 ![b](https://global.discourse-cdn.com/julialang/original/3X/d/1/d140d8dbf5c9ed9785663e5892f506976b162bbd.png)

---

<div class="post-metadata">

**Author:** ![weymouth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/weymouth/32/15839_2.png) [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Post date:** [May 23, 2021, 11:00am UTC](https://discourse.julialang.org/t/plots-colorschemes-issues/61670/3 "2021-05-23T11:00:30Z")

</div>

Yes, it used to work fine in Pluto, but when I just updated this morning, it started throwing that error.

---

<div class="post-metadata">

**Author:** ![ptoche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ptoche/32/23554_2.png) [@ptoche](https://discourse.julialang.org/u/ptoche)\
**Post date:** [May 23, 2021, 11:31am UTC](https://discourse.julialang.org/t/plots-colorschemes-issues/61670/4 "2021-05-23T11:31:21Z")

</div>

I installed `Pluto` specifically to run the above code, so it’s supposedly up to do date. Here’s what I have:

```
julia> Pkg.status("Pluto")
      Status `~/Julia/workspace/Project.toml`
  [c3e4b0f8] Pluto v0.14.5

```

If you ran `Pkg.update()`, sometimes you get a downgrade. What versions do you have?

---

<div class="post-metadata">

**Author:** ![weymouth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/weymouth/32/15839_2.png) [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Post date:** [May 23, 2021, 12:27pm UTC](https://discourse.julialang.org/t/plots-colorschemes-issues/61670/5 "2021-05-23T12:27:56Z")

</div>

Also 14.5. Weird!

---

<div class="post-metadata">

**Author:** ![ptoche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ptoche/32/23554_2.png) [@ptoche](https://discourse.julialang.org/u/ptoche)\
**Post date:** [May 24, 2021, 2:14am UTC](https://discourse.julialang.org/t/plots-colorschemes-issues/61670/6 "2021-05-24T02:14:52Z")

</div>

Have you tried in a completely clean environment? Start with new `Project.toml` and `Manifest.toml` files and for good measure delete any old versions of `Pluto`, `Plots` and `GR` packages inside `.julia/packages/` before reinstalling them. 🤔
