Graphics Reference
In-Depth Information
graph pie, over(occ7) by(union) pie(2, explode)
If we add the pie(2, explode) option,
the second slice is exploded in both
graphs.
Uses nlsw.dta & scheme vg s2c
nonunion
union
Prof
Mgmt
Sales
Cler.
Operat.
Labor
Other
Graphs by union worker
graph pie, over(occ7) by(union) sort
Here, we sort the slices from least
frequent to most frequent. Note that
separate legends are shown for each
chart. This is because the slices can be
ordered differently in the two different
graphs when sorted. Thus, when you
use the sort option for pie charts,
Stata shows two separate legends to
assure proper labeling of the slices.
Uses nlsw.dta & scheme vg s2c
nonunion
union
Cler.
Operat.
Cler.
Mgmt
Other
Labor
Labor
Prof
Mgmt
Prof
Operat.
Other
Sales
Sales
Graphs by union worker
graph pie, over(occ7) by(union, legend(off) )
plabel( all name)
Here, we add the plabel() option to
label the inside of each slice with the
name of the slice, so the legend is no
longer needed. We suppress the legend
with the legend(off) option, which is
placed within the by() option because
it, in a way, determines the placement
of the legend by turning it off.
Uses nlsw.dta & scheme vg s2c
nonunion
union
Other
Prof
Prof
Other
Mgmt
Labor
Mgmt
Labor
Operat.
Sales
Cler.
Operat.
Sales
Cler.
Graphs by union worker
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