<?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  : separated graphs in one page in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646924#M19879</link>
    <description>Thank You.  Finally, I got it.</description>
    <pubDate>Tue, 12 May 2020 02:05:40 GMT</pubDate>
    <dc:creator>Golf</dc:creator>
    <dc:date>2020-05-12T02:05:40Z</dc:date>
    <item>
      <title>sgplot  : separated graphs in one page</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646716#M19867</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; I have 5 series and would like to plot them separately but in one page.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following procedure:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Golf_0-1589206881476.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39289i5B0A66F1F5735620/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Golf_0-1589206881476.png" alt="Golf_0-1589206881476.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But these graphs show in the same plane as follow.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Golf_1-1589206951107.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39290i413F5B8F4A0D60BE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Golf_1-1589206951107.png" alt="Golf_1-1589206951107.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can I plot them separately but shown in one page.&lt;/P&gt;&lt;P&gt;Thank you.&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>Mon, 11 May 2020 14:23:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646716#M19867</guid>
      <dc:creator>Golf</dc:creator>
      <dc:date>2020-05-11T14:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot  : separated graphs in one page</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646723#M19868</link>
      <description>&lt;P&gt;It isn't clear what you want put you might need to reshape your data so that instead of using 5 different y variables you create data with one y value and an indicator variable to show which value. Then use SGPANEL with a PANELBY statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example using a data set you should have available showing an SGPLOT similar to yours, reshaping the data then using SGPANEL.&lt;/P&gt;
&lt;P&gt;I use a scatter because the data isn't really nice if plotting with "series", but the principle is the same.&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=sashelp.class;
   scatter x=age y=height ;
   scatter x=age y=weight ;
run; 

data reshape;
   set sashelp.class;
   value=Height;
   Valname='Height';
   output;
   value=weight;
   Valname='Weight';
   output;
run;

proc sort data=reshape;
   by valname;
run;

proc sgpanel data=reshape;
   panelby valname /columns=1 uniscale=column ;
   scatter x=age y=value;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 May 2020 14:33:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646723#M19868</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-05-11T14:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot  : separated graphs in one page</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646759#M19869</link>
      <description>&lt;P&gt;Dear&amp;nbsp; ballardw,&lt;/P&gt;&lt;P&gt;&amp;nbsp; That is what I want.&amp;nbsp; &amp;nbsp;The result is here.&amp;nbsp; &amp;nbsp; &amp;nbsp;However, I would like to know if I can plot the graph without sharing the scale of Y axis?&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 681px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39297i737E211F83060B35/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 15:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646759#M19869</guid>
      <dc:creator>Golf</dc:creator>
      <dc:date>2020-05-11T15:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot  : separated graphs in one page</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646760#M19870</link>
      <description>&lt;P&gt;See the example and discussion in the article &lt;A href="https://blogs.sas.com/content/iml/2015/02/25/plotting-multiple-series-transforming-data-from-wide-to-long.html" target="_self"&gt;"Plotting multiple series: Transforming data from wide to long."&lt;/A&gt;&amp;nbsp;The basic technique is to convert the data from wide to long and then use PROC SGPANEL.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 15:19:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646760#M19870</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-05-11T15:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot  : separated graphs in one page</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646800#M19872</link>
      <description>&lt;P&gt;If you place multiple graphs on a row within SGPANEL you are pretty restricted as to AXIS values range&lt;/P&gt;
&lt;P&gt;The example I provided creating a single row per topic and the Uniscale=column option should use a different Y axis for each graph.&lt;/P&gt;
&lt;P&gt;If you need more control of appearances and options you start moving into the Graphic Template Language and proc template to describe things. Lots more options but lots more stuff you have to provide and I can't find any quick/simple example that shows two different y axis examples (at least for more than two categories overall) on a single row.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 16:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646800#M19872</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-05-11T16:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot  : separated graphs in one page</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646809#M19873</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgscatter data=ARDL;&lt;/P&gt;
&lt;P&gt;plot (Inbank Inset Incpi fed nil)*date / join markerattrs=(size=0);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 17:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646809#M19873</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-05-11T17:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot  : separated graphs in one page</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646840#M19874</link>
      <description>&lt;P&gt;You can use ODS LAYOUT GRIDDED to get independent Y-axes for each plot, or you can TRANSPOSE the data and accept the gridding that SGPANEL produces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;data have;
  do x = 1 to 20;
    y1 = 100 + x;
    y2 = x;
    y3 = x**2;
    y4 = (x-5)**3;
    y5 = 30 - x;
    output;
  end;
run;

proc transpose data=have out=tall;
  by x;
  var y1-y5;
run;

title; footnote;

ods html path='.' file='plots.html';

ods layout gridded columns=2 advance=proc;

proc sgplot data=have; series x=x y=y1;
proc sgplot data=have; series x=x y=y2;
proc sgplot data=have; series x=x y=y3;
proc sgplot data=have; series x=x y=y4;
proc sgplot data=have; series x=x y=y5;
run;

ods layout end; 

proc sgpanel data=tall;
  panelby _name_ / novarname noheaderborder;
  series x=x y=col1;
  rowaxis display=(nolabel);
run;

ods html close;
&lt;/PRE&gt;
&lt;P&gt;Output ODS LAYOUT GRIDDED&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardADeVenezia_0-1589220723822.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39306i9C2F8E676BE126E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardADeVenezia_0-1589220723822.png" alt="RichardADeVenezia_0-1589220723822.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output SGPANEL PANELBY&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardADeVenezia_1-1589220757678.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/39307i9001292A3CAF0E02/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardADeVenezia_1-1589220757678.png" alt="RichardADeVenezia_1-1589220757678.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 18:12:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646840#M19874</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2020-05-11T18:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot  : separated graphs in one page</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646923#M19878</link>
      <description>Thank You.</description>
      <pubDate>Tue, 12 May 2020 02:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646923#M19878</guid>
      <dc:creator>Golf</dc:creator>
      <dc:date>2020-05-12T02:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot  : separated graphs in one page</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646924#M19879</link>
      <description>Thank You.  Finally, I got it.</description>
      <pubDate>Tue, 12 May 2020 02:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-separated-graphs-in-one-page/m-p/646924#M19879</guid>
      <dc:creator>Golf</dc:creator>
      <dc:date>2020-05-12T02:05:40Z</dc:date>
    </item>
  </channel>
</rss>

