Dear Statalist colleagues,
I am a co-author on a medical journal article that includes some Kaplan-Meier curves (sts graph). The journal editor requested that the vertical axis labels not include leading zeros (apparently APA and other style guidelines suggest omitting leading zeros for any quantities--like proportions, probabilities, and correlation coefficients--that cannot exceed 1). While there is a format for adding leading zeros (e.g., %0f3.2), there doesn't seem to be one for suppressing them. The %#.#g format seems to do this by default but doesn't allow for a fixed number of digits after the decimal place, which I find more visually attractive. To summarize:
gives labels 0.00, 0.25, 0.50, 0.75, and 1.00.
gives labels 0, .25, .5, .75, and 1.
However, I can't find a way to produce labels 0 , .25, .50, .75, and 1.
Is there a format that will produce these labels? Is there another way? Is my desire for fixed number of decimal places misguided?
Thanks for your help.
SIncerely,
Joe Canner
I am a co-author on a medical journal article that includes some Kaplan-Meier curves (sts graph). The journal editor requested that the vertical axis labels not include leading zeros (apparently APA and other style guidelines suggest omitting leading zeros for any quantities--like proportions, probabilities, and correlation coefficients--that cannot exceed 1). While there is a format for adding leading zeros (e.g., %0f3.2), there doesn't seem to be one for suppressing them. The %#.#g format seems to do this by default but doesn't allow for a fixed number of digits after the decimal place, which I find more visually attractive. To summarize:
Code:
sts graph
Code:
sts graph, ... ylabel(,format(%4.0g))
However, I can't find a way to produce labels 0 , .25, .50, .75, and 1.
Is there a format that will produce these labels? Is there another way? Is my desire for fixed number of decimal places misguided?
Thanks for your help.
SIncerely,
Joe Canner
Comment