Graphics Reference
In-Depth Information
twoway scatter ownhome propval100, text(47 62 "Washington, DC")
We can use the text() option to add
text to the graph. We add text to label
the observation belonging to
Washington, DC . See
Options : Adding text (299) for more
information about adding text in the
section.
Uses allstates.dta & scheme vg s2m
Washington, DC
0
20
40
60
80
100
% homes cost $100K+
twoway scatter ownhome propval100, text(47 62 "Washington, DC", size(large)
margin(medsmall) blwidth(vthick) box )
Stata gives you considerable control
over the display of text you add to the
graph, as well as the ability to enclose
the text in a box and control the
characteristics of the box. See
Options : Textboxes (303) for more
details.
Uses allstates.dta & scheme vg s2m
Washington, DC
0
20
40
60
80
100
% homes cost $100K+
twoway (scatter ownhome propval100) (scatteri 42.6 62.1 "DC")
This graph uses the scatteri (scatter
immediate) command to plot and label
a point for Washington, DC . The values
42.6 and 62.1 are the values for
ownhome and propval100 for
Washington, DC , and are followed by
"DC" , which acts as a marker label for
that point. If we had instead specified
(9) "DC" , then “ DC ” would have been
plotted at the 9 o'clock position.
Uses allstates.dta & scheme vg s2m
DC
0
20
40
60
80
100
% who own home
y
The electronic form of this topic is solely for direct use at UCLA and only by faculty, students, and staff of UCLA.
Search WWH ::




Custom Search