Graphics Reference
In-Depth Information
graph box wage, nooutsides over(south, relabel(1 "N & W" 2 "South") )
over(smsa, relabel(1 "Non Metro" 2 "Metro") )
This is an example of a box plot with
two over() variables. Here, we use the
relabel() option to change the labels
displayed for the levels of south and
smsa .
Uses nlsw.dta & scheme vg teal
20
15
10
5
0
N & W
South
N & W
South
Non Metro
Metro
excludes outside values
graph box prev exp tenure ttl exp, nooutsides ascategory
This shows a box plot with multiple
y
-variables but uses the ascategory
option to plot the different
25
-variables
as if they were categorical variables.
The boxes for the different variables are
the same color, and the categories are
labeled on the
y
20
15
-axis rather than with a
legend. The default labels on the
x
10
x
-axis
are not bad, but we might want to
change them.
Uses nlsw.dta & scheme vg teal
5
0
Prev. work exper.
Curr. work exper.
Tot. work exper.
excludes outside values
graph box prev exp tenure ttl exp, nooutsides ascategory
yvaroptions(relabel(1 "Prev Exp" 2 "Curr Exp" 3 "Tot Exp"))
If we had an over() option, we would
use the relabel() option to change the
labels on the
25
x
-axis. But since we had
20
y
multiple
-variables that we have
treated as categories, we then use the
yvaroptions(relabel()) option to
modify the labels on the
15
-axis.
Uses nlsw.dta & scheme vg teal
x
10
5
0
Prev Exp
Curr Exp
Tot Exp
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