Sample 39137: Observed and predicted atmospheric pressure differences
This sample uses the SGPLOT procedure to overlay markers and lines of different colors.
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 SGPLOT procedure to overlay markers and lines of different colors.
data enso;
input pressure @@;
year = _n_ / 12;
datalines;
12.9 11.3 10.6 11.2 10.9 7.5 7.7 11.7
12.9 14.3 10.9 13.7 17.1 14.0 15.3 8.5
5.7 5.5 7.6 8.6 7.3 7.6 12.7 11.0
12.7 12.9 13.0 10.9 10.4 10.2 8.0 10.9
13.6 10.5 9.2 12.4 12.7 13.3 10.1 7.8
4.8 3.0 2.5 6.3 9.7 11.6 8.6 12.4
10.5 13.3 10.4 8.1 3.7 10.7 5.1 10.4
10.9 11.7 11.4 13.7 14.1 14.0 12.5 6.3
9.6 11.7 5.0 10.8 12.7 10.8 11.8 12.6
15.7 12.6 14.8 7.8 7.1 11.2 8.1 6.4
5.2 12.0 10.2 12.7 10.2 14.7 12.2 7.1
5.7 6.7 3.9 8.5 8.3 10.8 16.7 12.6
12.5 12.5 9.8 7.2 4.1 10.6 10.1 10.1
11.9 13.6 16.3 17.6 15.5 16.0 15.2 11.2
14.3 14.5 8.5 12.0 12.7 11.3 14.5 15.1
10.4 11.5 13.4 7.5 0.6 0.3 5.5 5.0
4.6 8.2 9.9 9.2 12.5 10.9 9.9 8.9
7.6 9.5 8.4 10.7 13.6 13.7 13.7 16.5
16.8 17.1 15.4 9.5 6.1 10.1 9.3 5.3
11.2 16.6 15.6 12.0 11.5 8.6 13.8 8.7
8.6 8.6 8.7 12.8 13.2 14.0 13.4 14.8
;
run;
data tdata;
do covp1=0,0.0005,0.05,0.1,0.2,0.5,
1,2,3,4,5,6,8,10,15,20,50,
75,100,125,140,150,160,175,
200,225,250,275,300,350;
output;
end;
run;
proc glimmix data=enso;
model pressure = year;
random year / type=rsmooth knotmethod=equal(50);
parms (0) (10);
output out=gmxout1 pred=pred1;
run;
proc glimmix data=enso;
model pressure = year;
random year / type=rsmooth knotmethod=equal(50);
output out=gmxout2 pred=pred2;
parms (2) (10);
run;
proc glimmix data=enso;
model pressure = year;
random year / type=rsmooth knotmethod=equal(50);
output out=gmxout3 pred=pred3;
parms (200) (10);
run;
data plotthis;
merge gmxout1 gmxout2 gmxout3;
run;
ods listing close;
ods html file='pressure.html' path='.' style=default image_dpi=300;
ods graphics / reset width=600px height=400px imagename="pressure" imagefmt=gif;
title "Observed and Predicted Atmospheric Pressure Differences";
proc sgplot data=plotthis cycleattrs;
scatter x=year y=Pressure;
series x=year y=pred1 / lineattrs = (pattern=solid thickness=3)
legendlabel = "Var[RSmooth] = 0.0005" name= "pred1";
series x=year y=pred2 / lineattrs = (pattern=solid thickness=3)
legendlabel = "Var[RSmooth] = 3.5719" name= "pred2";
series x=year y=pred3 / lineattrs = (pattern=solid thickness=3)
legendlabel = "Var[RSmooth] = 186.71" name= "pred3";
keylegend "pred1" "pred2" "pred3";
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 SGPLOT procedure to overlay markers and lines of different colors.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Health and Life Sciences Industry
|
Date Modified: | 2010-04-06 14:37:56 |
Date Created: | 2010-03-23 14:59:09 |
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 | |