Home  /  Products  /  Stata 16  /  Point sizes for graphics

This page announced the new features in Stata 16. Please see our Stata 18 page for the new features in Stata 18.

Point sizes for graphics

Highlights

  • Specify the size of graph elements in printer points, inches, centimeters, and relative sizes
  • Specify these units to customize the size of text, markers, margins, and other graph elements
See all features

In Stata 16, you can now specify sizes of graph elements in printer points, inches, and centimeters. Simply add a unit suffix to the size: pt for printer points, in for inches, cm for centimeters, and rs for relative size.

Let's see it work

We create a scatterplot of car mileage (mpg) versus car weight (weight).

. sysuse auto
. scatter mpg weight, title("Gas mileage by weight")
psize1.png

Say that we want to change the size of the title to 16 printer points.

We can click on File > Start Graph Editor and then point and click to make the edit. We click on the title and select 16 point from the Size: menu.

gas.png

We can just as easily specify sizes when we create the graph. For instance, we request a 16-point title by typing

. scatter mpg weight, title("Gas mileage by weight", size(16pt))

While sizes in printer points are most common, we can also specify sizes in centimeters and inches.

To change the title size to 0.5 centimeters, we type

. scatter mpg weight, title("Gas mileage by weight", size(.5cm))

We are not limited to specifying sizes in text. We can, for example, change the size of the markers to be 8 printer points by typing

. scatter mpg weight, msize(8pt)

or to be 0.1 inches by typing

. scatter mpg weight, msize(0.1in)

Similarly, we can change the size of any text, marker, margin, line thickness, line spacing, or gap in our graph.

Tell me more

Read more about modifying the size of graph properties in the Stata Graphics Reference Manual; see [G-4] size.

ORDER STATA   UPGRADE NOW