我目前使用Plots包并将它与PyPlot包一起安装。随着代码Julia中的自定义颜色渐变热图
using Plots
y = rand(10, 10)
pyplot()
plt = plot(y, st=:heatmap, clim=(0,1), color=:coolwarm, colorbar_title="y")
我能够生产这种 heat map
我的问题是我怎么能渐变的颜色从其当前设置更改(coolwarm与从红色的转变,其相当于灰阶蓝)到具有从红色到绿色到蓝色渐变的新设置。有什么方法可以创建自定义colorgradient,并将其用作我的示例代码中'coolwarm'的参数?
https://matplotlib.org/examples/color/colormaps_reference.html https://matplotlib.org/users/colormaps.html – skan