<?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 Proc sgpanel / vertical axis scales on both sides of the plot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgpanel-vertical-axis-scales-on-both-sides-of-the-plot/m-p/580300#M18658</link>
    <description>&lt;P&gt;Hi Folks:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two issues that I greatly appreciate your help on my SGpanel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. How to show vertical axis scales on the left and right sides of the plot as shown in the plot below?&lt;/P&gt;
&lt;P&gt;2. How to show the value (variable 'percent') associated with the maximum of interval=60 (variable 'fu') by 'stage' and 'agegrp' so that the end of each lines (red, green and blue) in each panel will have values appear on the plot. Example shown in the panel A1 and b1 in the image below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample data attached.&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="two labels.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31656iDE63419BE25DE089/image-size/large?v=v2&amp;amp;px=999" role="button" title="two labels.png" alt="two labels.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics/width=12in height=10in;
proc sgpanel data=four1;
panelby SORT/ novarname columns=4 rows=4;
styleattrs DATACONTRASTCOLORS=(BLUE green red);
series  x=FU y=cr/lineattrs=(pattern=solid thickness=2) GROUP=STAGE; 
colaxis label='label' min=1 max=100 grid values=(0 to 60 by 1);
rowaxis label='my-stat' 
fitpolicy=thin grid  values=(0 to 1.0 by 0.01);
keylegend/  title=" " position=top;
title ' ';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2019 23:06:43 GMT</pubDate>
    <dc:creator>Cruise</dc:creator>
    <dc:date>2019-08-09T23:06:43Z</dc:date>
    <item>
      <title>Proc sgpanel / vertical axis scales on both sides of the plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgpanel-vertical-axis-scales-on-both-sides-of-the-plot/m-p/580300#M18658</link>
      <description>&lt;P&gt;Hi Folks:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have two issues that I greatly appreciate your help on my SGpanel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. How to show vertical axis scales on the left and right sides of the plot as shown in the plot below?&lt;/P&gt;
&lt;P&gt;2. How to show the value (variable 'percent') associated with the maximum of interval=60 (variable 'fu') by 'stage' and 'agegrp' so that the end of each lines (red, green and blue) in each panel will have values appear on the plot. Example shown in the panel A1 and b1 in the image below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample data attached.&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="two labels.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31656iDE63419BE25DE089/image-size/large?v=v2&amp;amp;px=999" role="button" title="two labels.png" alt="two labels.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics/width=12in height=10in;
proc sgpanel data=four1;
panelby SORT/ novarname columns=4 rows=4;
styleattrs DATACONTRASTCOLORS=(BLUE green red);
series  x=FU y=cr/lineattrs=(pattern=solid thickness=2) GROUP=STAGE; 
colaxis label='label' min=1 max=100 grid values=(0 to 60 by 1);
rowaxis label='my-stat' 
fitpolicy=thin grid  values=(0 to 1.0 by 0.01);
keylegend/  title=" " position=top;
title ' ';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 23:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-sgpanel-vertical-axis-scales-on-both-sides-of-the-plot/m-p/580300#M18658</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-08-09T23:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgpanel / vertical axis scales on both sides of the plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgpanel-vertical-axis-scales-on-both-sides-of-the-plot/m-p/580330#M18660</link>
      <description>&lt;P&gt;There are two keys for your request:&lt;/P&gt;
&lt;P&gt;1. Use the REFTICKS option to mirror the axis.&lt;/P&gt;
&lt;P&gt;2. Overlay another SCATTER plot using only the data points for fu=60 (see data step).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname local ".";

data tempfour;
set local.four1;
if fu=60 then y2=cr;
else y2=.;
run;

ods graphics/width=12in height=10in;
proc sgpanel data=tempfour;
panelby SORT/ novarname columns=4 rows=4;
styleattrs DATACONTRASTCOLORS=(BLUE green red);
series  x=FU y=cr/lineattrs=(pattern=solid thickness=2) GROUP=STAGE;
scatter x=FU y=y2/markerattrs=(size=0) datalabel=y2;
colaxis label='label' min=1 max=100 grid values=(0 to 60 by 1);
rowaxis label='my-stat' refticks=(values)
fitpolicy=thin grid  values=(0 to 1.0 by 0.01);
keylegend/  title=" " position=top;
title ' ';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Sat, 10 Aug 2019 04:49:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-sgpanel-vertical-axis-scales-on-both-sides-of-the-plot/m-p/580330#M18660</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-08-10T04:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgpanel / vertical axis scales on both sides of the plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgpanel-vertical-axis-scales-on-both-sides-of-the-plot/m-p/580401#M18665</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much. Both issues are resolved. Any hints as to how to display percent=cr*100 instead cr itself? cr worked perfectly with&amp;nbsp; format 5.2 for two decimal places. But it didn't display when I replace cr by percent in the preceding data step with various combinations of format and datalebelpos options. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate any hints.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;set local.four1;
percent=cr*100; 
if fu=60 then y2=percent;
else y2=.;
run;

ods graphics/width=12in height=10in;
proc sgpanel data=tempfour;
panelby SORT/ novarname columns=4 rows=4;
styleattrs DATACONTRASTCOLORS=(BLUE green red);
series  x=FU y=cr/lineattrs=(pattern=solid thickness=2) GROUP=STAGE;
scatter x=FU y=y2/markerattrs=(size=0) datalabel=y2;
colaxis label='label' min=1 max=100 grid values=(0 to 60 by 1);
rowaxis label='my-stat' refticks=(values)
fitpolicy=thin grid  values=(0 to 1.0 by 0.01);
keylegend/  title=" " position=top;
title ' ';&lt;BR /&gt;format y2 5.2; 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Aug 2019 14:42:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-sgpanel-vertical-axis-scales-on-both-sides-of-the-plot/m-p/580401#M18665</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-08-11T14:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Proc sgpanel / vertical axis scales on both sides of the plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-sgpanel-vertical-axis-scales-on-both-sides-of-the-plot/m-p/580448#M18671</link>
      <description>&lt;P&gt;The VALUES option on the ROWAXIS statement might conflict with PERCENT being assigned to Y2. Make sure your "* 100" is factored into your tick value list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;BR /&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 03:08:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-sgpanel-vertical-axis-scales-on-both-sides-of-the-plot/m-p/580448#M18671</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-08-12T03:08:32Z</dc:date>
    </item>
  </channel>
</rss>

