Sample 38765: Series plot with a break in the vertical axis
This sample uses the Graph Template Language (GTL) to create a series plot with a break in the vertical axis.
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 Graph Template Language (GTL) to create a series plot with a break in the vertical axis.
data test;
do x=1 to 10;
y = ranuni(123)*100;
y2=.;
output;
end;
do x=11 to 15;
y =.;
y2=(ranuni(123)*100) + 500;
output;
end;
do x=16 to 20;
y = ranuni(123)* 100;
y2=.;
output;
end;
run;
proc template;
define style styles.mystyle;
parent=styles.default;
class colors / 'docbg'=white;
class graphcolors / 'gwalls'=white;
end;
run;
proc template;
define statgraph broken;
begingraph;
Entrytitle "Broken Axis Example";
layout lattice / rowweights=(.48 .04 .48) columndatarange=union rowdatarange=union;
rowaxes;
rowaxis / display=(line ticks tickvalues);
rowaxis;
rowaxis / display=(line ticks tickvalues);
endrowaxes;
layout overlay / xaxisopts=(display=none)walldisplay=(fill);
seriesplot x=x y=y2 / display=(markers) break=true;
endlayout;
layout overlay / pad=0;
entry halign=left textattrs=(size=10pt) "W" / rotate=90 pad=0;
endlayout;
layout overlay / walldisplay=(fill);
seriesplot x=x y=y / display=(markers) break=true;
endlayout;
sidebar / align=left;
entry "Y axis" / rotate=90 textattrs=GraphLabelText;
endsidebar;
endlayout;
endgraph;
end;
run;
ods listing close;
ods html file="brokenaxis.html" path='.' style=mystyle image_dpi=100;
ods graphics / reset imagename='Broken_Axis' imagefmt=gif;
proc sgrender data=test template=broken;
run;
ods html close;
ods listing;
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 Graph Template Language (GTL) to create a series plot with a break in the vertical axis.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGRENDER Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Template Language (GTL)
|
Date Modified: | 2010-04-28 15:01:31 |
Date Created: | 2010-02-16 16:36:36 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.2 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
Microsoft® Windows® for x64 | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
Microsoft Windows XP Professional | 9.2 TS1M0 | |
Windows Vista | 9.2 TS1M0 | |
64-bit Enabled AIX | 9.2 TS1M0 | |
64-bit Enabled HP-UX | 9.2 TS1M0 | |
64-bit Enabled Solaris | 9.2 TS1M0 | |
HP-UX IPF | 9.2 TS1M0 | |
Linux | 9.2 TS1M0 | |
Linux for x64 | 9.2 TS1M0 | |
OpenVMS on HP Integrity | 9.2 TS1M0 | |
Solaris for x64 | 9.2 TS1M0 | |