3
$\begingroup$

How can I configure the plot labels so that when I scale the plot (either manually or producing a high-resolution rasterized version of it), they scale too? Basically, I want the labels to take up a constant fraction of the overall plot no matter what size the plot is

$\endgroup$
3
  • $\begingroup$ does the option LabelStyle -> {FontSize -> Scaled[.05]} give you what you need? $\endgroup$
    – kglr
    Oct 16, 2017 at 20:32
  • $\begingroup$ @kglr Why did you delete it? I was the answer to the literal question, and it had a good example in it. I was just about to upvote. $\endgroup$
    – Szabolcs
    Oct 16, 2017 at 20:46
  • $\begingroup$ @Szabolcs, deleted until i could figure out how to deal with the gap between the plot label and the plot at different image sizes. Then I saw your answer:) $\endgroup$
    – kglr
    Oct 16, 2017 at 21:01

1 Answer 1

3
$\begingroup$

To show the plot or just about any part of the notebook in larger size, you can use Magnify. You can also set the magnification option of the notebook (lower right corner).

To rasterize with higher resolution, set the resolution, not the image size.

Rasterize[..., ImageResolution -> a 72]

will rasterize at a size a times larger than the ImageSize, if you like to count in pixels, or at a 72 dpi if you like to think in terms of printing.


You can specify the font size in Scaled units to allow text to scale when you resize the image, but I do not recommend this. Instead, I suggest to prepare figures to a certain print size as I described here. This will make it easy to match up the size of the text in your figure with the surrounding text if the figure will be inserted into a document. It also allows you to rasterize at the correct print resolution (typically 600 dpi for line art).

I wrote about these ideas in:

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.