My first post on here, hope it's clear:
When using ListDensityPlot, I find that the axes and tick labels are not vector graphics (i.e. they're blurry when you zoom in), when exported as a PDF. I've tried Export, Save Graphic / Selection As... -> PDF, File -> Print Selection... -> PDF, and none of them work on their own. Is there a simple way to do this?
I've posted my "solution" below as an answer to this question - it might be helpful to others who have the same problem in the meantime, but maybe there is a better solution out there.
Extra points:
Exporting as an SVG produces a terribly blurry image (no idea why). I'm really after a vector graphic, not a high-definition JPEG or PNG.
I've tried 'save graphic as -> options -> highest quality vector resolution' (and all the other combinations) and it still produces a burry ~214kB image.
plotting using Plot[...] and similar functions for line plots does not have this problem at all (only the known 'save as' bold font problem).
I'm using Mathematica 11.3.0.0 on Max OS X x86.
I'm pretty sure previous recent versions didn't have this problem.
Minimum working example:
xmin = 0;
xmax = 10;
xstep = 0.5;
ymin = 0;
ymax = 20;
ystep = 0.5;
data = Table[
x^2 + y^2, {y, ymin, ymax, ystep}, {x, xmin, xmax, xstep}];
plot =
ListDensityPlot[data , DataRange -> {{xmin, xmax}, {ymin, ymax}},
ColorFunction -> "Rainbow",
LabelStyle -> {20, Black, FontFamily -> "Helvetica"}]
Which produces this (exported as a PNG to post on here):
And this is a PNG screenshot of an zoomed-in, exported PDF version of the image, to show how blurry it is:
Thanks in advance!