Sample 69825: Using the SGPANEL procedure to create panels of box plots with marker symbols
This SAS Note provides a sample on how to use the SGPANEL procedure to create panels of box plots with marker symbols using the JITTER option.
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 code uses the SGPANEL procedure to create panels of box plots with marker symbols using the JITTER option.
/* Create a subset of the SASHELP.HEART data set for subjects over 55.
Create a grouping variable for systolic and diastolic for paneled output */
data heart;
set sashelp.heart(where=(ageatstart > 56)keep=ageatstart sex systolic diastolic);
length group $9;
group="Systolic";
value=systolic;
output;
group="Diastolic";
value=diastolic;
output;
drop ageatstart systolic diastolic;
run;
title "Distribution of Blood Pressure by Sex for Age > 55";
proc sgpanel data=heart noautolegend;
/* Use the SORT= option to order the panels */
panelby group / novarname rows=1 columns=2 sort=descending;
/* Add the JITTER option to separate points at the same location */
/* Use filled outlined symbols */
scatter x=sex y=value / jitter filledoutlinedmarkers
markerattrs=(symbol=circlefilled size=11)
markerfillattrs=(color=cxfdae6b)
markeroutlineattrs=(color=black)
transparency=0.5;
vbox value / category=sex nofill
lineattrs=(color=black thickness=2)
whiskerattrs=(color=black thickness=2)
medianattrs=(color=black thickness=2)
displaystats=(std mean n);
rowaxis grid display=(nolabel);
colaxis display=(nolabel);
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.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGPANEL
|
Date Modified: | 2023-01-31 13:34:59 |
Date Created: | 2023-01-20 16:24:15 |
Operating System and Release Information
SAS System | Base SAS | Solaris for x64 | 9.4_M5 | | 9.4 TS1M5 | |
Linux for x64 | 9.4_M5 | | 9.4 TS1M5 | |
HP-UX IPF | 9.4_M5 | | 9.4 TS1M5 | |
64-bit Enabled Solaris | 9.4_M5 | | 9.4 TS1M5 | |
64-bit Enabled AIX | 9.4_M5 | | 9.4 TS1M5 | |
Windows 7 Ultimate x64 | 9.4_M5 | | 9.4 TS1M5 | |
Windows 7 Ultimate 32 bit | 9.4_M5 | | 9.4 TS1M5 | |
Windows 7 Professional x64 | 9.4_M5 | | 9.4 TS1M5 | |
Windows 7 Professional 32 bit | 9.4_M5 | | 9.4 TS1M5 | |
Windows 7 Home Premium x64 | 9.4_M5 | | 9.4 TS1M5 | |
Windows 7 Home Premium 32 bit | 9.4_M5 | | 9.4 TS1M5 | |
Windows 7 Enterprise x64 | 9.4_M5 | | 9.4 TS1M5 | |
Windows 7 Enterprise 32 bit | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows Server 2016 | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows Server 2012 Std | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows Server 2012 R2 Std | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows Server 2012 R2 Datacenter | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows Server 2012 Datacenter | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows Server 2008 for x64 | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows Server 2008 R2 | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows Server 2008 | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows 10 | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows 8.1 Pro x64 | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows 8.1 Pro 32-bit | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows 8.1 Enterprise x64 | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows 8 Pro x64 | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows 8 Pro 32-bit | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows 8 Enterprise x64 | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft Windows 8 Enterprise 32-bit | 9.4_M5 | | 9.4 TS1M5 | |
Microsoft® Windows® for x64 | 9.4_M5 | | 9.4 TS1M5 | |
z/OS 64-bit | 9.4_M5 | | 9.4 TS1M5 | |
z/OS | 9.4_M5 | | 9.4 TS1M5 | |