Stata 15 help for areastyle

[G-4] areastyle -- Choices for look of regions

Syntax

areastyle Description ------------------------------------------------------------------------- background determined by scheme foreground determined by scheme outline foreground outline with no fill plotregion default for plot regions histogram default used for bars of histograms ci default used for confidence interval ci2 default used for second confidence interval none no outline and no background color

p1bar - p15bar used by first - fifteenth "bar" plot p1box - p15box used by first - fifteenth "box" plot p1pie - p15pie used by first - fifteenth "pie" plot p1area - p15area used by first - fifteenth "area" plot p1 - p15 used by first - fifteenth "other" plot -------------------------------------------------------------------------

Other areastyles may be available; type

. graph query areastyle

to obtain the complete list of areastyles installed on your computer.

Description

The shape of the area is determined by context. The areastyle determines whether the area is to be outlined and filled and, if so, how and in what color.

Remarks

Remarks are presented under the following headings:

Overview of areastyles Numbered styles Using numbered styles When to use areastyles

Overview of areastyles

areastyle is used to determine the look of

1. the entire region in which the graph appears (see option style(areastyle) in [G-3] region_options)

2. bars (see option bstyle(areastyle) in [G-3] barlook_options)

3. an area filled under a curve (see option bstyle(areastyle) in [G-3] barlook_options)

4. most other enclosed areas, such as the boxes in box plots

For an example of the use of the areastyle none, see Suppressing the border around the plot region in [G-3] region_options.

Numbered styles

p1bar - p15bar are the default styles used for bar charts, including twoway bar charts and bar charts. p1bar is used for filling and outlining the first set of bars, p2bar for the second, and so on.

p1box - p15box are the default styles used for box charts. p1box is used for filling and outlining the first set of boxes, p2box for the second, and so on.

p1pie - p15pie are the default styles used for pie charts. p1pie is used for filling the first pie slice, p2pie for the second, and so on.

p1area - p15area are the default styles used for area charts, including twoway area charts and twoway rarea charts. p1area is used for filling and outlining the first filled area, p2area for the second, and so on.

p1 - p15 are the default area styles used for other plottypes, including twoway dropline charts, twoway spike charts, twoway rspike charts, twoway rcap charts, twoway rcapsym charts, and twoway rline charts. p1 is used for filling and outlining the first plot, p2 for the second, and so on. For all the plots listed above, only lines are drawn, so the shade settings have no effect.

Using numbered styles

The look defined by a numbered style, such as p1bar and p2area, is determined by the scheme selected. By "look" we mean such things as color, width of lines, and patterns used.

Numbered styles provide default "looks" that can be controlled by a scheme. They can also be useful when you wish to make, say, the third element on a graph look like the first. You can, for example, specify that the third bar on a bar graph be drawn with the style of the first bar by specifying the option barstyle(3, bstyle(p1bar)).

When to use areastyles

You can often achieve an identical result by specifying an areastyle or using more specific options, such as fcolor() or lwidth(), that change the components of an areastyle -- the fill color and outline attributes. You can even specify an areastyle as the base and then modify the attributes by using more specific options. It is often easiest to specify options that affect only the fill color or one outline characteristic rather than to specify an areastyle. If, however, you are trying to make many elements on a graph look the same, specifying the overall areastyle may be preferred.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index