Introduction to Stata 8 - (GRIPS
Introduction to Stata 8 - (GRIPS
Introduction to Stata 8 - (GRIPS
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
14.6. Appearance of markers, lines, etc.<br />
Marker symbols<br />
Markers are defined by symbol: msymbol(), outline colour: mlcolor(), fill colour<br />
mfcolor() and size msize(). To define a hollow circle:<br />
twoway (scatter mpg weight , msymbol(Oh))<br />
A hollow circle (Oh) is transparent. Obtain a circle with a non-transparent white fill by:<br />
twoway (scatter mpg weight , msymbol(O) mfcolor(white))<br />
Connecting lines<br />
The twoway line and twoway connected examples, section 14.7, use connecting<br />
lines; here the clpattern() and clwidth() options apply:<br />
twoway (line m1840-k1999 age , clpattern( - l - l – l ))<br />
The default connect-style is a straight line. Obtain a step-curve like a Kaplan-Meier plot by:<br />
twoway (line cum time , connect(J))<br />
Bars<br />
Bar graphs (twoway bar) and range plots use bar outlines; here the blpattern() and<br />
blwidth() options apply. The colour of the bar fill is defined by the bfcolor() option:<br />
... bar(1, bfcolor(gs9)) bar(2, bfcolor(gs14))<br />
Options and their arguments for defining the appearance of lines, bars and markers:<br />
Element<br />
Overall<br />
Lines Markers<br />
style Colour Pattern Width Symbol Size<br />
Legend etc. style() color()<br />
fill fcolor()<br />
outline lstyle() lcolor() lpattern() lwidth()<br />
Bars, areas bstyle() bcolor()<br />
fill bfcolor()<br />
outline blstyle() blcolor() blpattern() blwidth()<br />
Markers mstyle() mcolor() msymbol() msize()<br />
fill mfcolor()<br />
outline mlstyle() mlcolor() mlpattern() mlwidth()<br />
Connecting<br />
lines clstyle() clcolor() clpattern() clwidth()<br />
Arguments: p1<br />
..<br />
p15<br />
Au<strong>to</strong>matic<br />
(and unpredictable)<br />
allocation<br />
of styles <strong>to</strong><br />
elements<br />
none<br />
Grayscale:<br />
black<br />
gs0 (black)<br />
..<br />
gs16 (white)<br />
white<br />
blank<br />
l or solid<br />
- or dash<br />
_ or longdash<br />
shortdash<br />
dot<br />
dash_dot<br />
Formula, e.g.<br />
"-."<br />
"--.."<br />
42<br />
none<br />
*1.3<br />
130% of<br />
default<br />
i invisible<br />
O circle<br />
D diamond<br />
S square<br />
T triangle<br />
p point<br />
+ plus<br />
X cross<br />
Small:<br />
o d s t x<br />
Hollow: Oh<br />
*0.7 70%<br />
of default