Stata 15 help for area_options

[G-3] area_options -- Options for specifying the look of special areas

Syntax

area_options Description ------------------------------------------------------------------------- color(colorstyle) outline and fill color and opacity fcolor(colorstyle) fill color and opacity fintensity(intensitystyle) fill intensity

lcolor(colorstyle) outline color and opacity lwidth(linewidthstyle) thickness of outline lpattern(linepatternstyle) outline pattern (solid, dashed, etc.) lalign(linealignmentstyle) outline alignment (inside, outside, center) lstyle(linestyle) overall look of outline

astyle(areastyle) overall look of area, all settings above pstyle(pstyle) overall plot style, including areastyle

recast(newplottype) advanced; treat plot as newplottype ------------------------------------------------------------------------- All options are merged-implicit; see repeated options.

Description

The area_options determine the look of, for instance, the areas created by twoway area or the "rectangles" used by graph dot. The area_options and the barlook_options are synonymous when used on graph twoway and may be used interchangeably.

Options

color(colorstyle) specifies one color and opacity to be used both to outline the shape of the area and to fill its interior. See [G-4] colorstyle for a list of color choices.

fcolor(colorstyle) specifies the color and opacity to be used to fill the interior of the area. See [G-4] colorstyle for a list of color choices.

fintensity(intensitystyle) specifies the intensity of the color used to fill the interior of the area. See [G-4] intensitystyle for a list of intensity choices.

lcolor(colorstyle) specifies the color and opacity to be used to outline the area. See [G-4] colorstyle for a list of color choices.

lwidth(linewidthstyle) specifies the thickness of the line to be used to outline the area. See [G-4] linewidthstyle for a list of choices.

lpattern(linepatternstyle) specifies whether the line used to outline the area is solid, dashed, etc. See [G-4] linepatternstyle for a list of pattern choices.

lalign(linealignmentstyle) specifies whether the line used to outline the area is inside, outside, or centered. See [G-4] linealignmentstyle for a list of alignment choices.

lstyle(linestyle) specifies the overall style of the line used to outline the area, including its pattern (solid, dashed, etc.), thickness, color, and alignment. The four options listed above allow you to change the line's attributes, but lstyle() is the starting point. See [G-4] linestyle for a list of choices.

astyle(areastyle) specifies the overall look of the area. The options listed above allow you to change each attribute, but astyle() provides a starting point.

You need not specify astyle() just because there is something you want to change. You specify astyle() when another style exists that is exactly what you desire or when another style would allow you to specify fewer changes to obtain what you want.

See [G-4] areastyle for a list of available area styles.

pstyle(pstyle) specifies the overall style of the plot, including not only the areastyle, but also all other settings for the look of the plot. Only the areastyle affects the look of areas. See [G-4] pstyle for a list of available plot styles.

recast(newplottype) is an advanced option allowing the plot to be recast from one type to another, for example, from an area plot to a line plot; see [G-3] advanced_options. Most, but not all, plots allow recast().

Remarks

Remarks are presented under the following headings:

Use with twoway Use with graph dot

Use with twoway

area_options are allowed as options with any graph twoway plottype that creates shaded areas, for example, graph twoway area and graph twoway rarea, as in

. graph twoway area yvar xvar, color(blue)

The above would set the area enclosed by yvar and the x axis to be blue; see [G-2] graph twoway area and [G-2] graph twoway rarea.

The lcolor(), lwidth(), lpattern(), lalign(), and lstyle() options are also used to specify how plotted lines and spikes look for all of graph twoway's range plots, paired-coordinate plots, and for area plots, bar plots, spike plots, and dropline plots. For example,

. graph twoway rspike y1var y2var xvar, lcolor(red)

will set the color of the horizontal spikes between values of y1var and y2var to red.

Use with graph dot

If you specify graph dot's linetype(rectangle) option, the dot chart will be drawn with rectangles substituted for the dots. Then the area_options determine the look of the rectangle. The area_options are specified inside graph dot's rectangles() option:

. graph dot ..., ... linetype(rectangle) rectangles(area_options) ...

If, for instance, you wanted to make the rectangles green, you could specify

. graph dot ..., ... linetype(rectangle) rectangles(fcolor(green)) ...

See [G-2] graph dot.


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