<?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: SGplot with 3 y axes in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGplot-with-3-y-axes/m-p/631606#M19601</link>
    <description>&lt;P&gt;Well, if I had just checked the example on p264 of your &lt;A href="https://www.amazon.com/Statistical-Graphics-Procedures-Example-Effective/dp/1607647621" target="_self"&gt;red book&lt;/A&gt; where you show vital signs (BP, pulse, temp) by time, that's pretty much what I was looking for...&amp;nbsp; Thanks again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=have out=want ;
  by time ;
run ;

proc sgpanel  data=want ;
  panelby _name_ /layout=rowlattice onepanel novarname uniscale=column;
  series x=time y=col1 ;
  rowaxis display=(nolabel) ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I still might end up delving into GTL to&amp;nbsp; be able to dictate the size of each panel.&amp;nbsp; But definitely good to keep SGPANEL in mind.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2020 15:24:09 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2020-03-12T15:24:09Z</dc:date>
    <item>
      <title>SGplot with 3 y axes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGplot-with-3-y-axes/m-p/631567#M19592</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I use SGplot to make a plot with two different Y-axes, I love that I can use offsetmax and offsetmin to create distinct areas for each plot, rather than overlay them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  do time= 1 to 10 ;
    y1=rand('normal',0,1) ;
    y2=rand('normal',100,10) ;
    y3=rand('normal',1000,100) ;
    output;
  end;
run ;

proc sgplot data=have ;
  yaxis          
    offsetmax=0.6 /*bottom 40%*/  
    labelpos=DataCenter
  ;

  y2axis 
    offsetmin=0.6  /*top 40%*/
    labelpos=DataCenter
  ; 

  series x=time y=y1 ;
  series x=time y=y2 /y2axis ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Which returns:&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV class="l"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sgplot.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36797iE3628BE5B0A0C1CC/image-size/large?v=v2&amp;amp;px=999" role="button" title="sgplot.PNG" alt="sgplot.PNG" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I'm in the situation where I want to do the same thing, with 3 zones.&amp;nbsp; So I have Y1, Y2, Y3, which are all different attributes measured in different units, and I want a single plot with a shared time axis which shows how they all vary over time.&amp;nbsp; So like above, but with three zones (and ideally I'd like to control the height of each zone).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this possible with SGPLOT?&amp;nbsp; (I think no).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, I'm guessing it is possible if I get back into GTL, using layout lattice (maybe), and layout overlay to define each of the three plots?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;-Q.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 14:16:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGplot-with-3-y-axes/m-p/631567#M19592</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2020-03-12T14:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: SGplot with 3 y axes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGplot-with-3-y-axes/m-p/631590#M19597</link>
      <description>&lt;P&gt;A simpler way is to use SGPANEL procedure.&amp;nbsp; Mark the observations with three different classification values, say 1, 2, 3 in a column named 'Axis' or something.&amp;nbsp; Then use PANELBY=axis, with COLUMNS=1 or LAYOUT=ROWLATTICE.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 14:48:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGplot-with-3-y-axes/m-p/631590#M19597</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2020-03-12T14:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: SGplot with 3 y axes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGplot-with-3-y-axes/m-p/631594#M19598</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54&lt;/a&gt;&amp;nbsp;, that makes sense.&amp;nbsp; I had thought briefly about SGPANEL, but dismissed it too quickly without realizing I could just transpose my data to create a categorical variable to PanelBy.&amp;nbsp; Will give it a try.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So glad to see you're still contributing on here!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 15:05:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGplot-with-3-y-axes/m-p/631594#M19598</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2020-03-12T15:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: SGplot with 3 y axes</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGplot-with-3-y-axes/m-p/631606#M19601</link>
      <description>&lt;P&gt;Well, if I had just checked the example on p264 of your &lt;A href="https://www.amazon.com/Statistical-Graphics-Procedures-Example-Effective/dp/1607647621" target="_self"&gt;red book&lt;/A&gt; where you show vital signs (BP, pulse, temp) by time, that's pretty much what I was looking for...&amp;nbsp; Thanks again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=have out=want ;
  by time ;
run ;

proc sgpanel  data=want ;
  panelby _name_ /layout=rowlattice onepanel novarname uniscale=column;
  series x=time y=col1 ;
  rowaxis display=(nolabel) ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I still might end up delving into GTL to&amp;nbsp; be able to dictate the size of each panel.&amp;nbsp; But definitely good to keep SGPANEL in mind.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 15:24:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGplot-with-3-y-axes/m-p/631606#M19601</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2020-03-12T15:24:09Z</dc:date>
    </item>
  </channel>
</rss>

