Graphics Reference
In-Depth Information
graph box wage, nooutsides over(occ7) asyvars
legend(position(1))
We can put the legend up in the top
right corner of the graph with the
legend(position(1)) option. The
values you supply for position() are
like the numbers on a clock face, where
12 o'clock is the top, 6 o'clock is the
bottom, and 0 represents the center of
the clock face; see Styles : Clockpos (330)
for more details.
Uses nlsw.dta & scheme vg teal
Prof
Mgmt
Sales
Cler.
Operat.
Labor
Other
25
20
15
10
5
0
excludes outside values
graph hbox wage, nooutsides over(occ7) asyvars
legend(cols(1) position(9))
We switch to making this a horizontal
box chart and then move the legend
using the legend(position(9))
option. The legend is now placed in the
9 o'clock position and is displayed as a
single column.
Uses nlsw.dta & scheme vg teal
Prof
Mgmt
Sales
Cler.
Operat.
Labor
Other
0
5
10
15
20
25
hourly wage
excludes outside values
graph hbox wage, nooutsides over(occ7) asyvars
legend(cols(1) position(9) textfirst )
We can add the textfirst option to
put the key description before the key
in the legend.
Uses nlsw.dta & scheme vg teal
Prof
Mgmt
Sales
Cler.
Operat.
Labor
Other
0
5
10
15
20
25
hourly wage
excludes outside values
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