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.
help?> savefig
search: savefig StackOverflowError
savefig([plot,] filename)
Save a Plot (the current plot if plot is not passed) to file. The file type is inferred from the file extension. All backends support png and pdf file types, some
also support svg, ps, eps, html and tex.
Sorry for being unclear. I don’t want to save the Plot. I want to just save the heatmap (like, the picture that is inside the axis). No axis, no padding, just the heatmap.
Ok, thanks! I thought that the colorview was exactly for that, but I should look for something else then? What is a colorscale (apparently something else than cgrad)? Where do I find documentation for that?
You could also do the plot without any axes etc. and either adjust the axis-size to the figure size, or use some command-line tool to crop the white border.