General Options for Graphs
Many aspects of how graphs look, such as colours, may be influenced by selection of a "scheme". The default scheme Stata uses is called
s2color, and if you are content with the results, just leave things like they are. If you want to change specific aspects like, for instance, the number of labels on the y axis of a scattergram, you may use the appropriate option(s), and very often this is precisely what you will want to do.
Schemes, in contrast, change a large number of things at a single stroke. So it might be worth trying out a number of schemes whether they suit your needs (or your taste). For instance, in text printed black-and-white you may wish to avoid colours; so you might try one of Stata's monochrome options such as
s2mono. Here's an example.
graph twoway investments GDP, scheme(s1mono)
If you are sure that you wish to use a different scheme from the one provided by Stata as your default scheme, you may also
set your scheme, either for your current session, as in
set scheme s1mono
or permanently, as in
set scheme s1mono, perm
More information about schemes can be obtained via
help schemes; information on which schemes are available on your compute may be obtained by typing
graph query, schemes
Even if using a scheme may be an important step towards finalizing your graph, often you will still have to change some specific aspects of the display. So, whether you are using Stata's default scheme (by way of implication) or one of the other schemes, you should know what specific options are provided to change the look of graphs. In this page and the following entries (that refer to specific topics), an incomplete selection is offered.
Relationship between height and width
Typically, a graph is more wide than high. In certain circumstances, you may wish to change this. This can be achieved with the
aspectratio option. A ratio larger than 1 means produces a graph that is more tall than wide, as in
In contrast, a ratio smaller than 1 results in a graph that is more wide than tall.
Graph region and plot region
A graph is the entire "display unit" in which one or several aspects of your data are shown. A graph can consist of one or more plots. Typically the plot(s), e.g., a scatterplot, is surrounded by a margin; this margin is the graph region. The plot itself is shown in the plot region, of course. Note that in fact there is an inner and an outer plot region; the same goes for the graph region. For instance, the inner plot region of the scatterplot is delimited by the x and y axes; the labels are shown at the limits of the outer plot region.
Stata graphs by default have a white (inner) plot region, whereas the graph region (and often the outer plot region) is in light blue. To render the plot region white as well, use the option
plotregion(style(none)). Note that this also removes the borders (lines) that are drawn around the plot area. The latter effect can also be obtained with the option
All in all, graph and plot regions are a somewhat complex story. Note also that most schemes change the defaults for the graph region; as a consequence, it often is not necessary to deal with the graph and plot regions explicitly, or only with selected aspects. You may search in the Stata help system via
© W. Ludwig-Mayerhofer, Stata Guide | Last update: 28 Apr 2015