|
Hey All,
I've got data listing how long clinics have been in operation, and I'd like to create sort of a timeline plot, where horizontal bars stretch from <<clinic opening>> to <<clinic closing>>. Here's some play data:
data clinics ;
input
@1 clinic $ char7.
@9 fromyr
@15 toyr
;
** Is this necessary? ;
do yr = fromyr to toyr ;
output ;
end ;
datalines ;
North 1999 2009
South 1993 2011
East 1988 2009
West 1988 2009
Central 2000 2010
;
run ;
And here's a (breathtaking!) ascii art version of what I'd like to see:
/*
Wanted: Horizontal bars starting in fromyr and stretching to toyr
North | **************
South | ************
East | *********
West | *************
Central | *****
+------------------------
<<years listed here>>
*/
I got *close* to what I want with:
proc sgplot ;
series x = yr y = clinic ;
run ;
But the lines are joined from clinic to clinic, which looks wacky. Similar attempts with HBAR and HLINE were further away from the picture in my head.
Bonus points if there's a method that would also allow me to control the thickness of the bars according to the # of people served by the clinic (variable not shown above).
Many thanks!
-Roy
Roy Pardee | DATA WRANGLER
Group Health Research Institute
PHONE 360-447-8773 | 206-287-2078
E-MAIL pardee.r@ghc.org
www.grouphealthresearch.org
Group Health is people-powered. Learn more at http://www.ghc.org/annualmeeting
GHC Confidentiality Statement
This message and any attached files might contain confidential information protected by federal and state law. The information is intended only for the use of the individual(s) or entities originally named as addressees. The improper disclosure of such information may be subject to civil or criminal penalties. If this message reached you in error, please contact the sender and destroy this message. Disclosing, copying, forwarding, or distributing the information by unauthorized individuals or entities is strictly prohibited by law.
|