For example:
using Makie
x = rand(300, 400)
fig = heatmap(x)
Makie.save("out1.png", fig) # 800 x 600
Makie.save("out2.png", fig, px_per_unit=1) # 800 x 600
Makie.save("out3.png", fig, resolution=size(x)) # 300 x 400
The last version (out3.png) is closest to what I want, but it squeezes the actual heatmap and the x & y axes into a png of size 300 x 400. I want the plotting area to be 300 x 400 (so the saved image with axes becomes slightly larger), i.e. using exactly one pixel per matrix element. Is this possible?