* Scatterplot2 Example Show how to control the positions of legends and inserts. Graph winning olympic time with world record for each olympic year; data Olympic1500; input Year OlympicTime WorldRecord @@; datalines; 1896 273 250 1900 246 246 1904 245 245 1906 252 245 1908 243 240 1912 237 236 1920 242 235 1924 234 233 1928 233 231 1932 231 229 1936 229 229 1948 230 223 1952 225 223 1956 221 221 1960 216 216 1964 218 216 1968 215 213 1972 216 213 1976 219 212 1980 218 211 1984 213 211 1988 216 209 1992 220 209 1996 216 207 2000 212 206 2004 214 206 2008 213 206 2012 215 206 ; * Version A; proc sgplot data = Olympic1500; scatter x = Year y = OlympicTime; series x = Year y = WorldRecord; keylegend / location = inside position = topright; inset 'Olympics not held in' '1940 and 1944' / position = bottomleft; yaxis label = 'Time in Seconds'; title "Times for Men's 1500 Meter Run"; * Version B; proc sgplot data = Olympic1500; scatter x = Year y = OlympicTime / markerattrs = (symbol = circlefilled size = 2mm); series x = Year y = WorldRecord / lineattrs = (thickness = 2mm) transparency = .75; xaxis labelattrs = (weight = bold); yaxis label = 'Time in Seconds' labelattrs = (weight = bold); title bold "Times for Men's 1500 Meter Run"; run; quit;