2.8 Setting the Size of Output

The widths of plots may be set be means of two commands – set size and set width. Both are equivalent, and should be followed by the desired width measured in centimetres, for example:

set width 20

The set size command can also be used to set the aspect ratio of plots by following it with the keyword ratio. The number which follows should be the desired ratio of height to width. The following, for example, would produce plots three times as high as they are wide:

set size ratio 3.0

The command set size noratio returns to PyXPlot’s default aspect ratio of the golden ratio1, i.e. $\left((1+\sqrt {5})/2\right)^{-1}$. The special command set size square sets the aspect ratio to unity.

Footnotes

  1. Artists have used this aspect ratio since ancient times. The Pythagoreans observed its frequent occurance in geometry, and Phidias (490 -– 430 BC) used it repeatedly in the architecture of the Parthenon. Renaissance artists such as Dalí, who were in many ways disciples of classical aesthetics, often used the ratio. Leonardi Da Vinci observed that many bodily proportions closely approximate the golden ratio. Some even went so far as to suggest that the ratio had a divine origin (e.g. Pacioli 1509). As for the authors of this present work, we do assert that plots with golden aspect ratios are pleasing to the eye, but leave the ponderance of its theological significance as an exercise for the reader.