%corrgraph ----------------------------------------------------------------------- Create scatter plot with correlation coefficient displyed Description This macro takes a data file and two numeric variables in the data file. It calculates the correlation coefficient of the two variables and displays the correlation coefficient of the scatter plot of the two variables Syntax corrgraph(data=, varx=, vary=, outfile= ' ', dev=gif373, title=' ',axis1=, axis2=, symbol=, gopt=, plot=, labelx=' ', labely=' '); data - name of the SAS data file varx - name of the variable for the x axis vary - name of the variable for the y axis outfile - saves the graph as a .gif file with the given name dev - specifies the device used for saving the graph, which determines the size of the graph title - the title displayed at the top of the graph axis1 - options for the "axis1" statement (the x axis) axis2 - options for the "axis2" statement (the y axis) symbol - options for the "symbol" statement gopt - options for the "goptions" statement plot - options for the "plot" statement labelx - label for the x variable labely - label for the y variable Examples %corgraph(data=temp, varx=x, vary=y) %corgraph(data=temp, varx=x, vary=y, symbol= i=r ) Also See Also see the web at http://www.ats.ucla.edu/stat/sas/faq/corrgraph.htm Also see the macro itself from http://www.ats.ucla.edu/stat/sas/macros/corgraph.sas.txt