Stata 15 help for cline_options

[G-3] cline_options -- Options for connecting points with lines (subset of connect options)


cline_options Description ------------------------------------------------------------------------- connect(connectstyle) how to connect points

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

pstyle(pstyle) overall plot style, including linestyle

recast(newplottype) advanced; treat plot as newplottype ------------------------------------------------------------------------- All options are rightmost; see repeated options. Some plots do not allow recast().


The cline_options specify how points on a graph are to be connected.

In certain contexts (for example, [G-2] graph twoway scatter), the lpattern(), lwidth(), lcolor(), lalign(), and lstyle() options may be specified with a list of elements, with the first element applying to the first variable, the second element to the second variable, and so on. For information on specifying lists, see [G-4] stylelists.


connect(connectstyle) specifies whether points are to be connected and, if so, how the line connecting them is to be shaped; see [G-4] connectstyle. The line between each pair of points can connect them directly or in stairstep fashion.

lpattern(linepatternstyle), lwidth(linewidthstyle), lcolor(colorstyle), lalign(linealignmentstyle), and lstyle(linestyle) determine the look of the line used to connect the points; see lines. Note the lpattern() option, which allows you to specify whether the line is solid, dashed, etc.; see [G-4] linepatternstyle for a list of line-pattern choices.

pstyle(pstyle) specifies the overall style of the plot, including not only the linestyle, but also all other settings for the look of the plot. Only the linestyle affects the look of line plots. 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 a line plot to a scatterplot; see [G-3] advanced_options. Most, but not all, plots allow recast().


An important option among all the above is connect(), which determines whether and how the points are connected. The points need not be connected at all (connect(i)), which is scatter's default. Or the points might be connected by straight lines (connect(l)), which is line's default (and is available in scatter). connect(i) and connect(l) are commonly specified, but there are other possibilities such as connect(J), which connects in stairstep fashion and is appropriate for empirical distributions. See [G-4] connectstyle for a full list of your choices.

The remaining connect options specify how the line is to look: Is it solid or dashed? Is it red or green? How thick is it? Option lpattern() can be of great importance, especially when printing to a monochrome printer. For a general discussion of lines (which occur in many contexts other than connecting points), see lines.

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