Sample 45087: Create a time line with the HIGHLOW statement in PROC SGPLOT
The sample code on the
Full Code tab illustrates how to create a time line using the HIGHLOW statement in the SGPLOT procedure. This sample code requires SAS® 9.3 or higher.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample illustrates how to create a time line using the HIGHLOW statement in the SGPLOT procedure. This sample code requires SAS® 9.3 or higher.
data trt;
input PatientID $ Start_date :date9. End_date :date9. Treatment;
format Start_date End_date date9.;
datalines;
A 05Jan2011 31Mar2011 1
A 01May2011 01Sep2011 2
B 01Feb2011 31Aug2011 3
C 15Jun2011 15Oct2011 1
D 15Jan2011 15Mar2011 1
D 01May2011 15Sep2011 2
D 01Oct2011 15Dec2011 3
E 01Apr2011 15Nov2011 1
;
run;
title1 "Treatment Time Line by Patient";
proc sgplot data=trt;
highlow y=PatientID low=start_date high=end_date /
group=Treatment
type=bar
barwidth=0.1;
yaxis label="Patient ID" reverse;
xaxis label="Study Time";
run;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample illustrates how to create a time line using the HIGHLOW statement in the SGPLOT procedure.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGPLOT
|
Date Modified: | 2011-12-08 13:59:11 |
Date Created: | 2011-12-08 13:38:18 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.3 TS1M0 | |
Microsoft® Windows® for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | |
Windows 7 Enterprise x64 | 9.3 TS1M0 | |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | |
Windows 7 Home Premium x64 | 9.3 TS1M0 | |
Windows 7 Professional 32 bit | 9.3 TS1M0 | |
Windows 7 Professional x64 | 9.3 TS1M0 | |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | |
Windows 7 Ultimate x64 | 9.3 TS1M0 | |
Windows Vista | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 TS1M0 | |
64-bit Enabled HP-UX | 9.3 TS1M0 | |
64-bit Enabled Solaris | 9.3 TS1M0 | |
HP-UX IPF | 9.3 TS1M0 | |
Linux | 9.3 TS1M0 | |
Linux for x64 | 9.3 TS1M0 | |
Solaris for x64 | 9.3 TS1M0 | |