You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using CairoMakie
x =rand(30, 40)
scene =Scene(camera=campixel!, size=size(x))
heatmap!(scene, x)
save("out.png", scene, px_per_unit=1)
This first issue is that now we must use px_per_unit=1 to get a png out with the same resolution as the image matrix, otherwise it is twice as big. The bigger issue however, is that one row and column of pixels is clipped, and replaced on the other side with what appears to be an interpolation with white. See this image (zoom in with paint.net or similar to preserve pixels without interpolation):
This problem may in fact be related to the default px_per_unit=2, as in that case the image is clearly shifted by 1/2 "unit", aka one pixel:
The text was updated successfully, but these errors were encountered:
Using the code found here
This first issue is that now we must use
px_per_unit=1
to get a png out with the same resolution as the image matrix, otherwise it is twice as big. The bigger issue however, is that one row and column of pixels is clipped, and replaced on the other side with what appears to be an interpolation with white. See this image (zoom in with paint.net or similar to preserve pixels without interpolation):This problem may in fact be related to the default

px_per_unit=2
, as in that case the image is clearly shifted by 1/2 "unit", aka one pixel:The text was updated successfully, but these errors were encountered: