I have two questions about adjusting axis labels with NJC's spineplot.
1) First, I am trying to create a spineplot (v1.0.4 1 Nov 2007) with less sparse labeling on the second x axis.
Here's an example:
I would have thought the second command would accomplish this, but it merely seems to change the scale from percent to frequency. Is there a way around this?
2) My second question concerns modifying one of the categorical value labels on the first x axis. Here's an example:
This gets the label in the wrong place. I can hack it by doing something like this:
Unfortunately, this requires knowing where to put the label and the new label must be the same as the one it is trying to cover up. To avoid the second limitation, I tried redefining the label to be a space:
This did not work. Is there any way to do this that relaxes both constraints?
1) First, I am trying to create a spineplot (v1.0.4 1 Nov 2007) with less sparse labeling on the second x axis.
Here's an example:
Code:
sysuse auto spineplot foreign rep78, percent ylab(0(10)100, axis(2)) name(first, replace) spineplot foreign rep78, percent ylab(0(10)100, axis(2)) xlab(0(10)100, axis(1)) name(second, replace)
2) My second question concerns modifying one of the categorical value labels on the first x axis. Here's an example:
Code:
sysuse auto, clear label define rep78 1 "One" 2 "Two" 3 "Three" 4 "Four" 5 "Five" lab values rep78 rep78 spineplot foreign rep78, percent ylab(0(10)100, axis(2)) xlab(0(10)100, axis(1)) xlab(, axis(2)) xlab(3 "III", add labcolor(red) custom axis(2)) name(third, replace)
Code:
label define rep78 1 "One" 2 "Two" 3 "III" 4 "Four" 5 "Five", modify spineplot foreign rep78, percent ylab(0(10)100, axis(2)) xlab(0(10)100, axis(1)) xlab(, axis(2)) xlab(25 "III", add labcolor(red) custom axis(2)) name(fourth, replace)
Code:
label define rep78 1 "One" 2 "Two" 3 "`=uchar(32)'" 4 "Four" 5 "Five", modify
Comment