Saving heatmap as pdf resolution

I’m trying to save a simple 100x100 heatmap as a pdf. When I do, the heatmap ends up looking blurry in the saved image. Just doing


saves a pdf with the axis labels, colorbar, etc looking fine but the heatmap itself blurry. Doing savefig("stuff.png") also turns out fine, but I need it as a vectorized image.

Hoping this is a quick fix, thanks in advance.

This often has to do with the backend plotting package; do you know which one you are using? Potentially GR that is the usual default that comes with Plots.jl?

gr() but I’ve also tried plotlyjs()

You might try pgfplotsx ?

It depends on which PDF viewer you use to view the result. With Acrobat Reader the heatmap (internally handled as an image) should not be interpolated.