Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: controlling -sort- within a complex graph


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: controlling -sort- within a complex graph
Date   Thu, 19 Oct 2006 15:41:22 +0100

I am not clear on what your problem is. In my 
Stata, sorts produce ascending order. 

However, either -xsc(reverse)- or -ysc(reverse)- 
may be what you want. 

More generally, it helps to describe a problem
in terms of the simplest example you can think of
and a Stata dataset. 

Nick 
n.j.cox@durham.ac.uk 

Michael McCulloch

> I would like to sort this graph by a variable <idnum>. 
> Whether I place the 
> sort option sort(idnum) within the -twoway- section of the -scatter- 
> section of code, either way the sort displayed is always in 
> descending 
> order, whereas I would like the display in ascending order. 
> Any suggestions 
> would be greatly appreciated.
> 
>          twoway rcap min95 max95 Model if parmseq==1, horizontal 
> msize(huge) ///
>          xtitle(Hazard Ratio and 95% Confidence Interval, 
> margin(0 0 0 5)) ///
>          ytitle(Analysis Method) ylabel( 1 "II" 2 "II" 3 
> "IIIA", angle(h)) 
> mlabel(idstr) ///
>          || scatter Model estimate if parmseq==1, 
> msize(medlarge) legend(off)

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index