Is it possible to use tempvars (or some other Stata variable) to specify
values with the -ylabel- command? I have tried
-tempvar Mean-
-ylabel(`Mean', axis(2))-
but it gives me the error
"invalid label specifier, : __000000:".
It appears to be evaluating to the macro name, but not the stored
value. I have tried using compound quotes, but get similar results.
I am attempting to build a .do file that will automate the graphing of
data that varies such that `Mean' could be different at each run of the
file. I use -graph twoway line `Mean'- to generate a reference line on
my graph and it works as expected. It just doesn't seem quite right to
me that I can use the temporary variable to draw the graph, but not to
label it.
Thank you for your assistance.
Doug might like to use my -regaxis- package, downloadable from SSC, which
inputs one or more variables and/or values which must be in the axis range
and creates a set of axis labels as output in a macro. The package contains
2 programs, -regaxis- for regular linear axes and -logaxis- for regular
logarithmic axes. In Stata, type