<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to modify correlation plot x and y axis to have the same scale and begin at the origin? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-correlation-plot-x-and-y-axis-to-have-the-same/m-p/804707#M316926</link>
    <description>&lt;P&gt;It sounds like you should use PROC SGPLOT if you want complete control over axes ranges. Compare the following two plots:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc corr data=sashelp.class plots=scatter;
var weight height;
run;

title "Scatter Plot";
title2 "With 95% Prediction Ellipse";
proc sgplot data=sashelp.class;
   scatter x=weight y=height;
   ellipse  x=weight y=height;
   xaxis min=0;  /* do you also want MAX=500 ? */
   yaxis min=0;  /* do you also want MAX=500 ? */
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm not sure if " the same scale for the x and y axis" means that you also want the maximum value for each axis to be the same. If so, use the MAX= option on the XAXIS and YAXIS statements, as shown in the comments.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Mar 2022 10:52:32 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2022-03-29T10:52:32Z</dc:date>
    <item>
      <title>How to modify correlation plot x and y axis to have the same scale and begin at the origin?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-correlation-plot-x-and-y-axis-to-have-the-same/m-p/804644#M316885</link>
      <description>&lt;P&gt;Can someone tell me how to modify a correlation plot to have the same scale for the x and y axis that begins at the origin?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use my current code below, my graph "zooms in", but I want to display it differently.&lt;/P&gt;&lt;P&gt;ods graphics on;&lt;BR /&gt;PROC CORR DATA=TBI1 PLOTS=SCATTER(NVAR=all);&lt;BR /&gt;VAR D16MWT D26MWT;&lt;BR /&gt;RUN;&lt;BR /&gt;ods graphics off;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;graph:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mdphdUTMB_0-1648516526880.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69893i78077E309F233120/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mdphdUTMB_0-1648516526880.png" alt="mdphdUTMB_0-1648516526880.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 01:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-correlation-plot-x-and-y-axis-to-have-the-same/m-p/804644#M316885</guid>
      <dc:creator>mdphdUTMB</dc:creator>
      <dc:date>2022-03-29T01:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify correlation plot x and y axis to have the same scale and begin at the origin?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-correlation-plot-x-and-y-axis-to-have-the-same/m-p/804707#M316926</link>
      <description>&lt;P&gt;It sounds like you should use PROC SGPLOT if you want complete control over axes ranges. Compare the following two plots:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc corr data=sashelp.class plots=scatter;
var weight height;
run;

title "Scatter Plot";
title2 "With 95% Prediction Ellipse";
proc sgplot data=sashelp.class;
   scatter x=weight y=height;
   ellipse  x=weight y=height;
   xaxis min=0;  /* do you also want MAX=500 ? */
   yaxis min=0;  /* do you also want MAX=500 ? */
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm not sure if " the same scale for the x and y axis" means that you also want the maximum value for each axis to be the same. If so, use the MAX= option on the XAXIS and YAXIS statements, as shown in the comments.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 10:52:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-correlation-plot-x-and-y-axis-to-have-the-same/m-p/804707#M316926</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-03-29T10:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify correlation plot x and y axis to have the same scale and begin at the origin?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-modify-correlation-plot-x-and-y-axis-to-have-the-same/m-p/804725#M316936</link>
      <description>Rick have already given you answer. My code is the same as him .&lt;BR /&gt;&lt;BR /&gt;proc sgplot data=sashelp.class aspect=1 noautolegend;&lt;BR /&gt;scatter x=weight y=height;&lt;BR /&gt;ellipse  x=weight y=height/ alpha=0.05;&lt;BR /&gt;inset 'obs       =19' 'Corr     =0.877' 'Pvalue=&amp;lt;.0001';&lt;BR /&gt;xaxis min=0;&lt;BR /&gt;yaxis min=0;&lt;BR /&gt;run;</description>
      <pubDate>Tue, 29 Mar 2022 12:08:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-modify-correlation-plot-x-and-y-axis-to-have-the-same/m-p/804725#M316936</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-03-29T12:08:13Z</dc:date>
    </item>
  </channel>
</rss>

