<?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 seperate the two plots in proc sgplot with y2a? Can option= y2axis be used in proc templa in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631573#M19594</link>
    <description>&lt;P&gt;On the XAXIS statement add offsets to both ends:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;XAXIS offsetmix=0.1 offsetmax=0.1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should be enough; bit if not, you can increase it.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2020 14:28:35 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2020-03-12T14:28:35Z</dc:date>
    <item>
      <title>how to seperate the two plots in proc sgplot with y2a? Can option= y2axis be used in proc template?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631444#M19588</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=final;
   /*discreteoffset to seperate the two box plot*/
   /* the same offsets must be used in both YAXIS and Y2AXIS stmts */
   scatter x=AVISITN y=mean  /  discreteoffset=0.5  YErrorUpper=uclm YErrorLower=lclm ;
   series  x=AVISITN y=mean / ;

   scatter x=AVISITN y=mean1  /Y2Axis discreteoffset=-0.5  YErrorUpper=uclm1 YErrorLower=lclm1;
   series  x=AVISITN y=mean1/ Y2Axis;

   /*reference line*/
   refline 0  / axis=y;

   /*grid : line */
   yaxis   label="A (unit1)" offsetmax=0.1  offsetmax=0.1 values=(-2 to 0 by 0.2);
   y2axis  label="A (unit2)" offsetmax=0.1 offsetmax=0.1 values=(-1.0 to 0 by 0.1);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;have :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="a1.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36779i22682751715E432E/image-size/large?v=v2&amp;amp;px=999" role="button" title="a1.JPG" alt="a1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dataset:&lt;/P&gt;
&lt;TABLE width="1125"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="113"&gt;&lt;STRONG&gt;Analysis&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="52" rowspan="3"&gt;&lt;STRONG&gt;_TYPE_&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="54" rowspan="3"&gt;&lt;STRONG&gt;_FREQ_&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="151" rowspan="3"&gt;&lt;STRONG&gt;lclm&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="151" rowspan="3"&gt;&lt;STRONG&gt;uclm&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="151" rowspan="3"&gt;&lt;STRONG&gt;mean&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="151" rowspan="3"&gt;&lt;STRONG&gt;lclm1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="151" rowspan="3"&gt;&lt;STRONG&gt;uclm1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="151" rowspan="3"&gt;&lt;STRONG&gt;mean1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="113"&gt;&lt;STRONG&gt;Visit&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="113"&gt;&lt;STRONG&gt;(N)&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="113"&gt;2&lt;/TD&gt;
&lt;TD width="52"&gt;1&lt;/TD&gt;
&lt;TD width="54"&gt;38&lt;/TD&gt;
&lt;TD&gt;-0.55065&lt;/TD&gt;
&lt;TD&gt;-0.31251&lt;/TD&gt;
&lt;TD&gt;-0.43158&lt;/TD&gt;
&lt;TD&gt;-0.1778&lt;/TD&gt;
&lt;TD&gt;-0.10091&lt;/TD&gt;
&lt;TD&gt;-0.13936&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="113"&gt;3&lt;/TD&gt;
&lt;TD width="52"&gt;1&lt;/TD&gt;
&lt;TD width="54"&gt;40&lt;/TD&gt;
&lt;TD&gt;-0.63928&lt;/TD&gt;
&lt;TD&gt;-0.36022&lt;/TD&gt;
&lt;TD&gt;-0.49975&lt;/TD&gt;
&lt;TD&gt;-0.20642&lt;/TD&gt;
&lt;TD&gt;-0.11631&lt;/TD&gt;
&lt;TD&gt;-0.16137&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="113"&gt;4&lt;/TD&gt;
&lt;TD width="52"&gt;1&lt;/TD&gt;
&lt;TD width="54"&gt;145&lt;/TD&gt;
&lt;TD&gt;-0.55832&lt;/TD&gt;
&lt;TD&gt;-0.3985&lt;/TD&gt;
&lt;TD&gt;-0.47841&lt;/TD&gt;
&lt;TD&gt;-0.18028&lt;/TD&gt;
&lt;TD&gt;-0.12868&lt;/TD&gt;
&lt;TD&gt;-0.15448&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="113"&gt;5&lt;/TD&gt;
&lt;TD width="52"&gt;1&lt;/TD&gt;
&lt;TD width="54"&gt;35&lt;/TD&gt;
&lt;TD&gt;-0.84917&lt;/TD&gt;
&lt;TD&gt;-0.48169&lt;/TD&gt;
&lt;TD&gt;-0.66543&lt;/TD&gt;
&lt;TD&gt;-0.2742&lt;/TD&gt;
&lt;TD&gt;-0.15554&lt;/TD&gt;
&lt;TD&gt;-0.21487&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="113"&gt;6&lt;/TD&gt;
&lt;TD width="52"&gt;1&lt;/TD&gt;
&lt;TD width="54"&gt;108&lt;/TD&gt;
&lt;TD&gt;-0.66893&lt;/TD&gt;
&lt;TD&gt;-0.47219&lt;/TD&gt;
&lt;TD&gt;-0.57056&lt;/TD&gt;
&lt;TD&gt;-0.216&lt;/TD&gt;
&lt;TD&gt;-0.15247&lt;/TD&gt;
&lt;TD&gt;-0.18423&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="113"&gt;7&lt;/TD&gt;
&lt;TD width="52"&gt;1&lt;/TD&gt;
&lt;TD width="54"&gt;71&lt;/TD&gt;
&lt;TD&gt;-0.65607&lt;/TD&gt;
&lt;TD&gt;-0.37041&lt;/TD&gt;
&lt;TD&gt;-0.51324&lt;/TD&gt;
&lt;TD&gt;-0.21185&lt;/TD&gt;
&lt;TD&gt;-0.1196&lt;/TD&gt;
&lt;TD&gt;-0.16573&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;want:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="a2.JPG" style="width: 467px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36780i8FAF1AEDB6CE12C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="a2.JPG" alt="a2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;use different axis for different units:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data want;&lt;BR /&gt;&amp;nbsp;set have;&lt;BR /&gt;avisitn1=avisitn+0.1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 05:23:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631444#M19588</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-03-12T05:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to seperate the two plots in proc sgplot with y2a? Can option= y2axis be used in proc templa</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631449#M19589</link>
      <description>&lt;P&gt;The key here is that the X axis variable you have is not discrete. Therefore, the DISCRETEOFFSET option is ignored. In this case, you need to explicitly tell the XAXIS to be discrete. Add the following line and your code should work as expected:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;XAXIS type=discrete;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;BR /&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 05:18:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631449#M19589</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-03-12T05:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to seperate the two plots in proc sgplot with y2a? Can option= y2axis be used in proc templa</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631472#M19590</link>
      <description>&lt;P&gt;hi, Dan, thanks. It works, but the graph is not imcomplete.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;avisitn=avisitn+0.1 , which also works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="捕获.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36786i6648A9C67047C066/image-size/large?v=v2&amp;amp;px=999" role="button" title="捕获.JPG" alt="捕获.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 08:16:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631472#M19590</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-03-12T08:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to seperate the two plots in proc sgplot with y2a? Can option= y2axis be used in proc templa</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631571#M19593</link>
      <description>&lt;P&gt;I'm not sure I'm understanding what your looking for, but I just posted a question using offsetmin and offsetmax that shows how to completely separate the y2axis.&amp;nbsp; So the bottom of half of the plot shows data plotted against yaxis, and the top half shows data plotted against y2axis:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Graphics-Programming/SGplot-with-3-y-axes/m-p/631567#M19592" target="_blank"&gt;https://communities.sas.com/t5/Graphics-Programming/SGplot-with-3-y-axes/m-p/631567#M19592&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(My question there is whether SGPLOT can do this with 3 y axes...)&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 14:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631571#M19593</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2020-03-12T14:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to seperate the two plots in proc sgplot with y2a? Can option= y2axis be used in proc templa</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631573#M19594</link>
      <description>&lt;P&gt;On the XAXIS statement add offsets to both ends:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;XAXIS offsetmix=0.1 offsetmax=0.1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should be enough; bit if not, you can increase it.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 14:28:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631573#M19594</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-03-12T14:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to seperate the two plots in proc sgplot with y2? Can y2axis be used in proc template?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631765#M19606</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="捕获.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36827i9F48B6429AC97366/image-size/large?v=v2&amp;amp;px=999" role="button" title="捕获.JPG" alt="捕获.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/grstatgraph/63878/HTML/default/viewer.htm#n1tf9vsmrjtmvin1x3aeo74h9ct8.htm" target="_blank" rel="noopener"&gt;https://support.sas.com/documentation/cdl/en/grstatgraph/63878/HTML/default/viewer.htm#n1tf9vsmrjtmvin1x3aeo74h9ct8.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dan, I appreciate your help, my figure looks good now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another question, &amp;nbsp;Can y2axis be used in proc template?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="捕获.JPG" style="width: 585px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36828i56A29CD6C9C5F0AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="捕获.JPG" alt="捕获.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 02:22:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631765#M19606</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-03-13T02:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to seperate the two plots in proc sgplot with y2a? Can option= y2axis be used in proc templa</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631766#M19607</link>
      <description>Hi Quentin , my question has been solved,thanks.&lt;BR /&gt;&lt;BR /&gt;I don't want show my figure with panelby.</description>
      <pubDate>Fri, 13 Mar 2020 02:25:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631766#M19607</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-03-13T02:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to seperate the two plots in proc sgplot with y2? Can y2axis be used in proc template?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631779#M19610</link>
      <description>&lt;P&gt;Yes, use the YAXIS=Y2 option on your SERIESPLOT.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 04:19:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/631779#M19610</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-03-13T04:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to seperate the two plots in proc sgplot with y2? Can y2axis be used in proc template?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/632595#M19637</link>
      <description>Thanks again, Dan, I will try to use proc template for this figure</description>
      <pubDate>Tue, 17 Mar 2020 08:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-seperate-the-two-plots-in-proc-sgplot-with-y2a-Can-option/m-p/632595#M19637</guid>
      <dc:creator>blueskyxyz</dc:creator>
      <dc:date>2020-03-17T08:48:56Z</dc:date>
    </item>
  </channel>
</rss>

