Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Tim <lists@timbp.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: graph change between times |

Date |
Wed, 07 Apr 2010 18:37:35 +1000 |

Hello Statalist Any advice welcome.

What I want

What I did

So I turned to an overlay of -tw pcspike- and -tw scatter-. My result This is the code I ended with: tw (pcspike c2001_ bchar2 c2007_ bchar2 if grp==1, horiz) /// (pcspike c2001_ bchar2 c2007_ bchar2 if grp==2, horiz) /// (pcspike c2001_ bchar2 c2007_ bchar2 if grp==3, horiz) /// (pcspike c2001_ bchar2 c2007_ bchar2 if grp==4, horiz) /// (pcspike c2001_ bchar2 c2007_ bchar2 if grp==5, horiz) /// (sc bchar2 c2007_ , msize(vsmall) mcolor(black)) /// , legend(order(1 - "CPAP" 2 3 4 5) position(4) ring(0) col(1) /// label(1 "Ventilation") /// label(2 "All hospitals") /// label(3 "Tertiary") /// label(4 "CPAP accredited") /// label(5 "Other hospitals")) /// ylabel(1(1)16 ,valuelabel angle(0) nogrid tlen(0)) /// ymtick(0.5(1)15.5,grid) /// ytitle("Infant characteristics") /// yscale(reverse) /// xtitle("Percentage of infants in that group who received CPAP") /// note("Point is value in 2007; line extends from 2001 value") The graph it produces is at http://members.iinet.net.au/~timbp/Graph.gph

Problem 1 (the big problem, and why I posted) I am having trouble with the legend positioning.

I would expect -legend position(4)- to give the perfect compromise.

Problem 2 (as I'm posting, I might as well get an answer to this) Several of the graph categories are subcategories of Gestational Age.

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**st: AW: Exclude some observations from a sample in a regression** - Next by Date:
**st: Merging two datasets multiple times** - Previous by thread:
**[no subject]** - Next by thread:
**st: Merging two datasets multiple times** - Index(es):