LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 21 Sep 2011 10:41:51 -0700
Reply-To:   "Pardee, Roy" <pardee.r@GHC.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Pardee, Roy" <pardee.r@GHC.ORG>
Subject:   Can SGPLOT do this?
Content-Type:   text/plain; charset="us-ascii"

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.


Back to: Top of message | Previous page | Main SAS-L page