/**********************************************************************/ /* Create the data set */ data temps; input date date7. temp; cards; 01apr92 45 01apr92 73 02apr92 49 02apr92 75 03apr92 52 03apr92 60 04apr92 39 04apr92 62 05apr92 50 05apr92 72 ; /* Calculate the mean temperature */ proc means data=temps mean noprint; var temp; by date; output out=meands(keep=date temp avgtemp) mean=avgtemp; run; /* Create a new data set with high, low, and mean values */ data both; merge temps meands; by date; run; /**********************************************************************/ /* Print the resulting data set */ proc print data=both; format date date7.; run; /**********************************************************************/ /* Define symbols */ symbol1 i=hilo v=none c=black; symbol2 i=none v=x h=2.5 c=black; /* Provide a border around the graphics area */ /* and set the default font for text */ goptions ftext=swiss; title 'High, Low, and Mean Temperatures for April'; /* Generate the plot */ proc gplot data=both; plot temp*date avgtemp*date / overlay haxis=axis1 frame; format date date7.; /* Define horizontal axis */ axis1 minor=none label=none offset=(2); run; /**********************************************************************/