I can plot a matrix as a heatmap and I can even choose my own colormap. But how can I save just the heatmap (not the plot) as a png-file? For example:
using Plots gr() xs = range(-1, 1, length=30) ys = range(-1, 1, length=30) zs = randn(30, 30) whiteblue = cgrad([:white, :blue]) heatmap(xs, ys, zs, colorbar=false, color=whiteblue)
Is there any way to save the matrix as a png, possibly with a custom colormap? I can do
using Images using FileIO save(File(format"PNG", "map.png"), colorview(Gray, zs))
Is this even close that what I want? Can I change the colormap? I would prefer to have the same colormap as in the heatmap plot, but that is not strictly necessary, something similar is also fine. Maybe I just failed to spot it in the docs.