SAS/Graphics

      Gplot

      symbol color=blue value=square interpol=none;
      proc gplot data=work.australia ; 
      plot lifesat*lngdp /grid; 
      run ;
      
      • The symbol statement defines the color, the value and the interpolation between the points on the plot.
        • interpol can be "none" (scatterplot), "needle", "regression" (regression line), "line", "spline".
      • You can put two plots on the same graph with the 'overlay' option in the plot statement
      symbol1 color=blue value=square interpol=none;
      symbol2 color=red value=dot interpol=line;
      proc gplot data = australia2 ; 
      plot  lifesat*lngdp = 1 lifesat_pred*lngdp = 2 /overlay grid; 
      run ;
      
      ↑Jump back a section

      Export to other format

      You can export to png, jpeg, pdf … Here is an example with a png file.

      goptions reset=all;
      filename output "W:/…/regression.png"; 
      goptions device=png gsfname=output gsfmode=replace;
      symbol1 color=blue value=square interpol=none;
      symbol2 color=red value=circle interpol=line;
      title "Regression Line" ; 
      proc gplot data = australia2 ; 
      plot  lifesat*lngdp = 1 lifesat_pred*lngdp = 2 /overlay grid; 
      run ;
      
      ↑Jump back a section
      Last modified on 13 September 2009, at 12:22