5
$\begingroup$

This question already has an answer here:

Is it possible to set the height and width of a plot in absolute units for in $\rm{cm}$? Ideally I'd specifically like to control the frame size for when the plot option Frame->True is set?

I've seen that you can set the size of the export plot in absolute units, but can't uncover anything where I can set the size of the frame and plot region explicitly in a notebook.

$\endgroup$

marked as duplicate by Lukas Lang, m_goldberg plotting Aug 14 at 15:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    $\begingroup$ try cm = 72/2.54 ; Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True, ImageSize -> 1 -> 2 cm] ro Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True, ImageSize -> 1 -> {3 cm, cm}]. See this answer to a related question. $\endgroup$ – kglr Aug 14 at 0:57
7
$\begingroup$

You can use the (still undocumented) form ImageSize -> a -> b to make a user units correspond to b printer's points. (See also this answer to a related question.)

cm = 72/2.54 ; 

Column[{Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True, AspectRatio -> Automatic,
   ImageSize -> 1 -> 2 cm],
  Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True,  AspectRatio -> Automatic,
   ImageSize -> 1 -> {2 cm, cm}] ,
  Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True, AspectRatio -> Automatic,
   ImageSize -> 1 -> {2 cm, 3 cm}] }]

enter image description here

$\endgroup$
  • 1
    $\begingroup$ Perfect. Thanks! Why is there so much undocumented stuff in M?! $\endgroup$ – Q.P. Aug 14 at 3:29

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