I want to label my x-axis (year) in the following format: %ty'YY.
One approach is to generate a variable and directly set its format:
When I generate a graph using the variable, this happens:

In case it's unclear or unreadable, the x-axis label reads YY 2002' (for instance) instead of '02.
Another approach is to set the format within the graph command, using the option xlabel(,format(%ty'YY)). This produces an identical graph to the one pictured and described above.
Am I doing something wrong, or is this a bug?
One approach is to generate a variable and directly set its format:
Code:
clear set obs 10 gen year = _n+2000 format year %ty'YY list +------+ | year | |------| 1. | '01 | 2. | '02 | 3. | '03 | 4. | '04 | 5. | '05 | |------| 6. | '06 | 7. | '07 | 8. | '08 | 9. | '09 | 10. | '10 | +------+
Code:
gen y = runiform() twoway line y year
In case it's unclear or unreadable, the x-axis label reads YY 2002' (for instance) instead of '02.
Another approach is to set the format within the graph command, using the option xlabel(,format(%ty'YY)). This produces an identical graph to the one pictured and described above.
Am I doing something wrong, or is this a bug?
Comment