Plots backend pythonplot colormap has no effect when legend is false

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> heatmap(yc[:],xc,Itc[:,:,3NH[3]÷4],legend=false,cmap=:jet)

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

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.

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

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

@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 (with a contained mwe that’s reproducible, which is not the case in your post).

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.