Sample 56520: Display a table of data values with a graph
The sample code on the Full Code tab illustrates the use of the COLAXISTABLE statement in PROC SGPANEL to display a table of data values with the graph. The COLAXISTABLE statement requires the third maintenance release of SAS® 9.4 (TS1M3).
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.
The sample code below uses the COLAXISTABLE statement in PROC SGPANEL to display a table of data values with the graph. The COLAXISTABLE statement requires the third maintenance release of SAS 9.4 (TS1M3).
proc sql;
create table minmax as
select country, prodtype, min(actual) as min, max(actual) as max, count(actual) as num
from sashelp.prdsale
group by country, prodtype;
quit;
data prdsale;
set sashelp.prdsale minmax;
run;
title1 h=1.5 'Sales by Country';
ods graphics / reset outputfmt=png height=400px width=600px border;
proc sgpanel data=prdsale;
styleattrs datacolors=(tan cxbdbdbd)
datacontrastcolors=(black black);
panelby country / novarname columns=3 headerattrs=(size=12)
headerbackcolor=grayf5;
vbox actual / category=prodtype group=prodtype capshape=line
dataskin=pressed meanattrs=(symbol=diamondfilled);
colaxis display=(nolabel noticks novalues);
rowaxis valueattrs=(size=10) labelattrs=(size=12);
format min max dollar12.;
colaxistable num / label='Num' position=bottom separator
valueattrs=(size=10) labelattrs=(size=10);
colaxistable min / label='Min' position=bottom separator
valueattrs=(size=10) labelattrs=(size=10);
colaxistable max / label='Max' position=bottom separator
valueattrs=(size=10) labelattrs=(size=10);
keylegend / title='' valueattrs=(size=12) autoitemsize;
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 uses the COLAXISTABLE statement in PROC SGPANEL to display a table of data with the graph. The COLAXISTABLE statement requires the third maintenance release of SAS 9.4 (TS1M3).
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGPANEL
|
Date Modified: | 2015-08-28 15:02:35 |
Date Created: | 2015-08-28 11:31:10 |
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.4 TS1M3 | |
Z64 | 9.4 TS1M3 | |
Microsoft® Windows® for x64 | 9.4 TS1M3 | |
Microsoft Windows 8 Enterprise 32-bit | 9.4 TS1M3 | |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M3 | |
Microsoft Windows 8 Pro 32-bit | 9.4 TS1M3 | |
Microsoft Windows 8 Pro x64 | 9.4 TS1M3 | |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M3 | |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M3 | |
Microsoft Windows 8.1 Pro | 9.4 TS1M3 | |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M3 | |
Microsoft Windows Server 2008 | 9.4 TS1M3 | |
Microsoft Windows Server 2008 R2 | 9.4 TS1M3 | |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M3 | |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M3 | |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M3 | |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M3 | |
Microsoft Windows Server 2012 Std | 9.4 TS1M3 | |
Windows 7 Enterprise 32 bit | 9.4 TS1M3 | |
Windows 7 Enterprise x64 | 9.4 TS1M3 | |
Windows 7 Home Premium 32 bit | 9.4 TS1M3 | |
Windows 7 Home Premium x64 | 9.4 TS1M3 | |
Windows 7 Professional 32 bit | 9.4 TS1M3 | |
Windows 7 Professional x64 | 9.4 TS1M3 | |
Windows 7 Ultimate 32 bit | 9.4 TS1M3 | |
Windows 7 Ultimate x64 | 9.4 TS1M3 | |
64-bit Enabled AIX | 9.4 TS1M3 | |
64-bit Enabled Solaris | 9.4 TS1M3 | |
HP-UX IPF | 9.4 TS1M3 | |
Linux for x64 | 9.4 TS1M3 | |
Solaris for x64 | 9.4 TS1M3 | |