2
$\begingroup$

Is there any way to label frames in latex like fashion which (label text) also scale appropriately on zooming the plot?

$\endgroup$
4
  • $\begingroup$ You mean, when specifically you export a plot in pdf form? $\endgroup$
    – Feyre
    Commented Aug 6, 2016 at 11:22
  • $\begingroup$ We need to know more about what you are trying to do before we can answer this question. $\endgroup$
    – m_goldberg
    Commented Aug 6, 2016 at 15:33
  • 1
    $\begingroup$ Related: "How can I scale a plot in vector graphic or PDF form?" $\endgroup$ Commented Aug 7, 2016 at 14:39
  • $\begingroup$ @Feyre. No, in original question I mean zooming by corner dragging. But of course ultimately we need to export it or save it. $\endgroup$
    – Sluth
    Commented Aug 8, 2016 at 11:47

1 Answer 1

4
$\begingroup$

You can use Scaled for the FontSize, either in Style or BaseStyle. You may need additional ImagePadding to make room for the labels.

Plot[Sinc[x], {x, 0, 10}
 , Axes -> False
 , Frame -> True
 , FrameLabel -> "Wave Motion"
 , BaseStyle -> {FontSize -> Scaled[0.05]}
 , ImagePadding -> {{50, 10}, {60, 10}}
]

enter image description here

The same plot rescaled by corner dragging:

enter image description here

enter image description here

A generic example of font scaling:

Also see:

The earliest use on Stack Exchange of FontSize -> Scaled that I can find is by belisarius:

$\endgroup$

Your Answer

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

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