Graphics Reference
In-Depth Information
graph bar wage, over(occ7) asyvars showyvars legend(off)
This example is similar to the previous
example, but we use the legend(off)
option to suppress the display of the
legend.
Uses nlsw.dta & scheme vg s2m
Prof
Mgmt
Sales
Cler.
Operat.
Labor
Other
graph bar wage, over(occ7) asyvars legend(label(1 "Professional")
label(2 "Management"))
We can use legend(label()) to change
the labels for one or more of the bars in
the graph. Here, we change the labels
for the first and second bars in the
legend. Note that you use a separate
label() option for each bar. This is in
contrast to the relabel() option,
where all of the label assignments were
placed in one relabel() option; see
Bar : Cat axis (123).
Uses nlsw.dta & scheme vg s2m
Professional
Management
Sales
Cler.
Operat.
Labor
Other
graph bar wage, over(occ7) asyvars legend( rows(2) colfirst )
In this example, we use the rows(2)
option combined with colfirst to
display the legend in two rows and to
order the keys by column (instead of
the default, which is by row). This
yields keys that are more adjacent to
the bars that they label.
Uses nlsw.dta & scheme vg s2m
Prof
Mgmt
Sales
Cler.
Operat.
Labor
Other
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