It's common to export graphics from Mathematica that are subsequently scaled to various sizes that cannot (at least not conveniently) be anticipated. This is problematic in cases where (as is common) fonts and line weights need to fixed (e.g. throughout a document or presentation, or simply to prevent a figure from looking ridiculous).
For example, if the default options for fonts and line weights are satisfactory, then
Plot[{Sin[x], Cos[5 x]}, {x, 0, 2 Pi}]
will produce a figure with correct font sizes an line weights
and scaling this figure within Mathematica (e.g. by dragging the resize frame) will preserve these font sizes and line weights:
However, if I export the original graphic in a resizable format (i.e., choosing "Save Graphic As..." and specifying a PDF "Vector Representation", which, as far as I can tell, is the only form suitable for subsequent resizing), the fonts and line weights scale with the graphic
which is not the desired result.
Is there a way to generate and export graphics so that font sizes and line weights are preserved when the exported graphic is resized?
ImageSize
option (e.g. forShow[]
andImageResolution
for export, though I only used the latter one forPNG
images, it might also work for the font size and line with ineps
exports. $\endgroup$PDF
except maybe using Javascript in Adobe Reader (which won't work in other readers). WithSVG
it could also be done using Javascript if you plan to display the graphic in a browser (e.g., by catching theonresize
event). Of course that goes into off-topic territory for this site. $\endgroup$