# Plots backend pythonplot colormap has no effect when legend is false

**URL:** https://discourse.julialang.org/t/plots-backend-pythonplot-colormap-has-no-effect-when-legend-is-false/94483
**Category:** New to Julia
**Tags:** pyplot, plots
**Created:** [February 11, 2023, 10:26pm UTC](https://discourse.julialang.org/t/plots-backend-pythonplot-colormap-has-no-effect-when-legend-is-false/94483 "2023-02-11T22:26:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jinfreedom](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jinfreedom](https://discourse.julialang.org/u/jinfreedom)
#### Post date: [February 11, 2023, 10:26pm UTC](https://discourse.julialang.org/t/plots-backend-pythonplot-colormap-has-no-effect-when-legend-is-false/94483/1 "2023-02-11T22:26:15Z")

</div>

Hi, I’m using `Plots`’s `:pythonplot` backend with `heatmap` and found the keyword `cmap=:jet` does not have any effect when `legend` or `colorbar` is false. Since If instead I use `gr`, it works fine:

```julia
julia> heatmap(yc[:],xc,Itc[:,:,3NH[3]÷4],legend=false,cmap=:jet)

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/2/72a09cfff5cc8c464b80fc874021dba11e6d47a1.png)

```julia
julia> heatmap(yc[:],xc,Itc[:,:,3NH[3]÷4],legend=true,cmap=:jet)

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/0/3/033cbf965e549734395902bc80b3beba344b9428.png)  
Any idea on how to fix it? I don’t want the colorbar. I use `:pythonplot` for other favorable behaviors that `gr` and other backends cannot all have.

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [February 12, 2023, 6:02pm UTC](https://discourse.julialang.org/t/plots-backend-pythonplot-colormap-has-no-effect-when-legend-is-false/94483/2 "2023-02-12T18:02:07Z")

</div>

I see the same problem with the pythonplot() backend and I don’t know of a workaround, other than using pyplot():

```julia
using Plots; pyplot(dpi=100)
heatmap(rand(9,9), cmap=:jet, cbar=false)

```

---

<div class="post-metadata">

### Author: ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)
#### Post date: [February 12, 2023, 6:33pm UTC](https://discourse.julialang.org/t/plots-backend-pythonplot-colormap-has-no-effect-when-legend-is-false/94483/3 "2023-02-12T18:33:12Z")

</div>

@jinfreedom , if this works in `pyplot()` and not in `pythonplot()`, then this is a regression.

Open up an issue in [Issues · JuliaPlots/Plots.jl · GitHub](https://github.com/JuliaPlots/Plots.jl/issues) (with a contained mwe that’s reproducible, which is not the case in your post).

---

<div class="post-metadata">

### Author: ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)
#### Post date: [February 12, 2023, 7:06pm UTC](https://discourse.julialang.org/t/plots-backend-pythonplot-colormap-has-no-effect-when-legend-is-false/94483/4 "2023-02-12T19:06:18Z")

</div>

I missed the mwe provided by @rafael.guerra .

The issue should be fixed by [`PythonPlot`: fix cmap by t-bltg · Pull Request #4665 · JuliaPlots/Plots.jl · GitHub](https://github.com/JuliaPlots/Plots.jl/pull/4665).
