Thanks to Kit Baum, a -mylabels- package may now be
downloaded from SSC. Stata 8 is required.
-mylabels- and -myticks- bundled therewith are for
easier creation of axis labels or ticks on transformed scales.
Suppose you draw a graph and one axis is on a
transformed square root scale. You wish the axis labels
to show untransformed values.
For some values this is easy; for example,
... ylabel(0 1 2 "4" 3 "9" 4 "16" 5 "25")
says use "4" as label for 2, and so forth.
For other values and/or other transformations the conversion
may be more difficult to do in your head, so that a
dedicated utility is helpful.
The idea behind -mylabels- is that you feed it the numeric labels you
want
shown and the transformation being used. It will then place the
appropriate
specification in a local macro which you name. You may then use that
local
macro as part of a later graph command.
A similar idea may be used for axis ticks.
Examples
. mylabels 10(10)100, myscale(sqrt(@)) local(myla)
. myticks 5(10)95, myscale(sqrt(@)) local(myti)
. spikeplot ... , yla(`myla', ang(h)) ymtic(`myti')
The idea behind these programs may be traced to a program by Patrick
Royston:
Royston, P. 1996. Flexible axis scaling. Stata Technical Bulletin 34,
9-10
(and in STB Reprints 6, 34-36).
Nick
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/