<?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 do I set range for scatter plot in proc template in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/how-do-I-set-range-for-scatter-plot-in-proc-template/m-p/518454#M17523</link>
    <description>&lt;P&gt;You'll want to use a LAYOUT LATTICE instead of a LAYOUT GRIDDED, and you will want to set the COLUMNDATARANGE and ROWDATARANGE to UNIONALL so that the data ranges from all cells are included in the axis range. Here is a simple example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph scatter;
begingraph;
layout lattice / columns=2 rows=1 columndatarange=unionall rowdatarange=unionall;
layout overlay;
        scatterplot x=height1 y=weight1;
endlayout;
layout overlay;
       scatterplot x=height2 y=weight2;
endlayout  ;
endlayout;
endgraph;
end;
run;

data class;
set sashelp.class;
height1 =height;
weight1=weight;
height2=height*2;
weight2=weight*2;
run;

proc sgrender data=class template=scatter; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
    <pubDate>Tue, 04 Dec 2018 15:40:46 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2018-12-04T15:40:46Z</dc:date>
    <item>
      <title>how do I set range for scatter plot in proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-do-I-set-range-for-scatter-plot-in-proc-template/m-p/518295#M17520</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Anyone know how to set range for&amp;nbsp;scatter plot in proc template?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to make two scatter plot side by side in proc template, with same x range and y range. how to do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;   
define statgraph scatter;      
layout gridded / columns=2 row=1;             
layout overlay;             
        scatterplot x=height1 y=weight1;            
endlayout;        
layout overlay;             
       scatterplot x=height2 y=weight2;             
endlayout  ;      
endlayout;   
end; 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Dec 2018 03:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-do-I-set-range-for-scatter-plot-in-proc-template/m-p/518295#M17520</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-12-04T03:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: how do I set range for scatter plot in proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-do-I-set-range-for-scatter-plot-in-proc-template/m-p/518305#M17521</link>
      <description>&lt;P&gt;Set xaxisopts and yaxisopts.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See example below which is for a survival curve.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_templt_a0000000061.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_templt_a0000000061.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;layout overlay / xaxisopts=(shortlabel=XNAME offsetmin=.05
   linearopts=(viewmax=MAXTIME tickvaluelist=XTICKVALS
   tickvaluefitpolicy=XTICKVALFITPOL)) yaxisopts=(label=
   "Survival Probability" shortlabel="Survival" linearopts=(viewmin=
   0 viewmax=1 tickvaluelist=(0 .2 .4 .6 .8 1.0)));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 05:32:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-do-I-set-range-for-scatter-plot-in-proc-template/m-p/518305#M17521</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-12-04T05:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: how do I set range for scatter plot in proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-do-I-set-range-for-scatter-plot-in-proc-template/m-p/518454#M17523</link>
      <description>&lt;P&gt;You'll want to use a LAYOUT LATTICE instead of a LAYOUT GRIDDED, and you will want to set the COLUMNDATARANGE and ROWDATARANGE to UNIONALL so that the data ranges from all cells are included in the axis range. Here is a simple example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph scatter;
begingraph;
layout lattice / columns=2 rows=1 columndatarange=unionall rowdatarange=unionall;
layout overlay;
        scatterplot x=height1 y=weight1;
endlayout;
layout overlay;
       scatterplot x=height2 y=weight2;
endlayout  ;
endlayout;
endgraph;
end;
run;

data class;
set sashelp.class;
height1 =height;
weight1=weight;
height2=height*2;
weight2=weight*2;
run;

proc sgrender data=class template=scatter; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 15:40:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-do-I-set-range-for-scatter-plot-in-proc-template/m-p/518454#M17523</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-12-04T15:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: how do I set range for scatter plot in proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-do-I-set-range-for-scatter-plot-in-proc-template/m-p/519334#M17546</link>
      <description>&lt;P&gt;thanks for your help&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 01:16:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-do-I-set-range-for-scatter-plot-in-proc-template/m-p/519334#M17546</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-12-07T01:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: how do I set range for scatter plot in proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-do-I-set-range-for-scatter-plot-in-proc-template/m-p/519335#M17547</link>
      <description>&lt;P&gt;Thanks, that helps&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 01:16:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-do-I-set-range-for-scatter-plot-in-proc-template/m-p/519335#M17547</guid>
      <dc:creator>xiangpang</dc:creator>
      <dc:date>2018-12-07T01:16:51Z</dc:date>
    </item>
  </channel>
</rss>

