[Tex/LaTex] Best practices for setting figure width/height ratio across the document in a consistent fashion


When I have many plots in a document I usually lose a lot of time to individually set width and height of each pictures to make them appear right within the document. Additionally complicating the matter is that some figure is produced in R adding other variables to each final-size equation, but also that figures can't be simply of strictly the same size since (of course) content must always influence the aspect ratio (e.g. time-series could require a 1/3 height/width ratio while a simple bar chart might only require something close to 1/1).

According to Edward Tufte "[g]raphics should tend toward the horizontal" (Tufte, E. R. (2001). The visual display of quantitative information. P. 186). I agree. Tufte also proposes two ratios: the Golden rectangle–1/1.618 (the same used in Grecian temples)–or a simpler 1/1.5.

I know this could sound as a vague question but I wonder if someone has successfully experimented in this sense with any technique to consistently render figures across a LaTeX document (maybe by setting in the preamble base-line values as variable to be used across the document–still allowing locally for minor tweaks).

Best Answer

Here is another idea, slightly different from Jubobs' idea in the comments. It uses global key setting for the package graphicx:


What this does is sets these keys globally for all instances of \includegraphics. The meaning here is that, unless specifically overridden, all images will be included at their native aspect ratio, with a maximum width and height of 1in (obviously these values can be adjusted to your preference).

The slight wrinkle in this is that if you want a certain image to be included larger than your default settings, you have to locally set both width=<your-desired-width> and height=<some-large-value> (or vice-versa), otherwise the maximum constraint in the other dimension is reached.

Also: a figure can be distorted by setting keepaspectratio=false locally and setting width/height to the desired values.



A plain old image with default settings:

A tall image with default settings:

Illustration of ``local tweaks'' 
(note that full specified width is not reached because of the 
\verb+height=1in+ and \verb+keepaspectratio+ constraints):

Illustration of unconstrained ``local tweaks'' without distortion:

enter image description here