6
$\begingroup$

This question already has an answer here:

When generating graphs, I would like to keep the size of my plot range constant, instead of the size of the image in total (as been done with ImageSize). Please see the example below. How can I achieve a constant plot region?

Graphs generated in Mathematica with different plot region, albeit identical ImageSize

$\endgroup$

marked as duplicate by Carl Woll, march, m_goldberg plotting May 1 at 19:38

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$ Did you try specify the PlotRange as an option to Plot? $\endgroup$ – grbl Oct 20 '16 at 8:26
  • $\begingroup$ Related (or other possible duplicates): 79763, 88312, 4059. $\endgroup$ – march May 1 at 18:44
2
$\begingroup$

You can work the limits control through AspectRatio combined with PlotRange

As in this example:

enter image description here

$\endgroup$
  • $\begingroup$ The question is regarding that the different axes tick label lengths led to a rescaling of the plot region for the same specification of imagesize. This is not addressed by your observation. $\endgroup$ – ComptonScattering May 18 '18 at 22:52
0
$\begingroup$

Unfortunately Mathematica lacks an expedite way to solve this problem in general. You can play with the ImagePadding option to adjust the relative positioning of the two plots, as illustrated below. However, the extent of padding needed depends on the size of the tick labels, font used, etc.

GraphicsGrid[
  { {Plot[x,{x,1,2},ImagePadding->{{36,All},{All,All}}]}, {Plot[x,{x,0.0001,0.0002}]} },
  Spacings -> 0
]

Using ImagePadding

$\endgroup$

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