Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Felipe Benguria <fb4k@virginia.edu> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: label one variable using values from another variable when you have nonintegers |
Date | Tue, 16 Oct 2012 12:57:48 -0400 |
Thank you very much. That's helpful. I was not aware that I had to say where extra commands come from, I will next time. Felipe . On Thu, Oct 11, 2012 at 2:29 PM, Nick Cox <njcoxstata@gmail.com> wrote: > > -labmask- is from SJ. You are asked to say where it comes from. > > You can't attach value labels to non-integers. > > There are at least three work-arounds: > > 1. > > gen xaxis2 = round(10* xaxis) > > and plot in terms of -xaxis2-. > > 2. > > Use -mylabels- (SSC) to generate the argument for an -xlabel()- option. > > . mylabels 11 14 19 21, myscale(@/10) local(stuff) > 1.1 "11" 1.4 "14" 1.9 "19" 2.1 "21" > > 3. Type in the bottom line above directly. > > > On Thu, Oct 11, 2012 at 7:07 PM, Felipe Benguria <fb4k@virginia.edu> > wrote: > > > I have data that looks like the following and I want to make a > > graph using yaxis vs xavis data: > > > > > > "yaxis" "xaxis" "desired x axis to appear on graph (only as label)" > > > > 10 1.1 11 > > 9 1.4 14 > > 12 1.9 19 > > 15 2.1 21 > > > > Labmask, suggested in other posts, does not work, since I cannot assign > > a > > label for the second column using the third column, since the second > > column > > has non-integers. > > > > I have not been able to find an alternative, and would appreciate your > > help > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/