%let gpath='C:\'; %let dpi=100; ods listing gpath=&gpath image_dpi=&dpi; /* Read the data directly from the Internet */ /*filename webfile url "http://academic.udayton.edu/kissock/http/Weather/gsod95-current/NYALBANY.txt" */ /* proxy='http://inetgw.fyi.sas.com:80' debug;*/ filename webfile url "http://academic.udayton.edu/kissock/http/Weather/gsod95-current/NYALBANY.txt" debug; data temp2011; infile webfile; input month day year temp; label temp='Temperature (F)'; format date date9.; date=MDY(month, day, year); dayofyear=0; dayofyear=put(date,julday3.); if temp^=-99 and year=2011 then output; run; ods graphics / reset width=5in height=2.5in imagename='Temperature2011_Oct'; title 'Daily Average Temperature for October 2011'; proc sgplot data=temp2011; where month=10; series x=day y=temp / lineattrs=(thickness=2); yaxis grid values=(-20 to 100 by 5) valueshint; xaxis display=(nolabel); run; ods graphics / reset width=5in height=2.5in imagename='Temperature2011_Sep'; title 'Daily Average Temperature for September 2011'; proc sgplot data=temp2011; where month=9; series x=day y=temp / lineattrs=(thickness=2); yaxis grid values=(-20 to 100 by 5) valueshint; xaxis display=(nolabel); run; ods graphics / reset width=5in height=2.5in imagename='Temperature2011_Feb'; title 'Daily Average Temperature for January 2011'; proc sgplot data=temp2011; where month=2; series x=day y=temp / lineattrs=(thickness=2); yaxis grid values=(-20 -10 0 10 20 32 40 50 60 70 80 90 100) valueshint; xaxis display=(nolabel); run; data age; do i=1 to 100; Age=5+25*ranuni(2); Weight=25 + age*5+ 20*ranuni(2); output; end; run; /*proc print;run;*/ ods graphics / reset width=5in height=2.5in imagename='Weight_by_Age'; title 'Weight by Age'; proc sgplot data=age; scatter x=age y=weight; xaxis grid values=(6 9 13 16 19 21 25 30 40 50) valueshint; yaxis grid; run;