<?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 limit the number of gplots in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22443#M4921</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If my data creates hundreds of gplots after using a BY statement.. How can I limit the number.. say I want to only view the first 20 or 30.. thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Mar 2012 19:15:18 GMT</pubDate>
    <dc:creator>podarum</dc:creator>
    <dc:date>2012-03-05T19:15:18Z</dc:date>
    <item>
      <title>limit the number of gplots</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22443#M4921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If my data creates hundreds of gplots after using a BY statement.. How can I limit the number.. say I want to only view the first 20 or 30.. thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 19:15:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22443#M4921</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-03-05T19:15:18Z</dc:date>
    </item>
    <item>
      <title>limit the number of gplots</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22444#M4922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc gplot data=whatever (obs=###)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pick a number that represents enough observations for 20 or 30 plots, and ignore the last plot since it may be incomplete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a more scientific version, you could run through a DATA step to create a subset of your data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data subset;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set whatever;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; by my_by_var;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if last.my_by_var then n_plots + 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if n_plots=25 then stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then run PROC GPLOT on the subset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 19:43:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22444#M4922</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-03-05T19:43:23Z</dc:date>
    </item>
    <item>
      <title>limit the number of gplots</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22445#M4923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks Astounding..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 19:45:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22445#M4923</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-03-05T19:45:01Z</dc:date>
    </item>
    <item>
      <title>limit the number of gplots</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22446#M4924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Or, since your BY variable is in some kind of order, pick the one that's about 20th and use a WHERE statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where char_byvar le 'DEPT20';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where num_byvar le 54;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;directly in your GPLOT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc gplot data=whatever;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;...where statement....;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; *plot statements;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 20:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22446#M4924</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-03-05T20:27:53Z</dc:date>
    </item>
    <item>
      <title>limit the number of gplots</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22447#M4925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks Cynthia, would you know how I can I limit the number of inputs shown on the x-axis (eg. Date..) I have way too many showing ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 20:34:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22447#M4925</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-03-05T20:34:14Z</dc:date>
    </item>
    <item>
      <title>limit the number of gplots</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22448#M4926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I assume that you mean you have x values out of a desired range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can add an option to your plot statement (s) like: / haxis= value1 to value2 by increment &lt;/P&gt;&lt;P&gt;ro define an AXIS statement if you need more control and reference it:&lt;/P&gt;&lt;P&gt;/haxis=axis1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This approach of restricting range usually generates a warning message if I remember correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your x values are dates or times some other bits come in how to specify them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 20:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22448#M4926</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-03-05T20:41:42Z</dc:date>
    </item>
    <item>
      <title>limit the number of gplots</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22449#M4927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks Ballardw, but I mean more like instead of showing 2000.01 ... 2000.02 ..... 2000.03 and so on, which crams it up.. I want to show only say years or quarters or something like 2000.01... 2000.06&amp;nbsp;&amp;nbsp; that sort of thing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 20:47:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22449#M4927</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-03-05T20:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: limit the number of gplots</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22450#M4928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... if you know something about the values of the BY-variable, you can use a WHERE statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data air;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;set sashelp.air;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;year = year(date);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;goptions reset=all;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc gplot data=air;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;plot air*date;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;by year;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;where year between 1950 and 1952;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to limit the output by the number of plots, you could try something like this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ods listing close; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc sql number;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ods output sql_results=temp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;select distinct year from air;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ods output close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;select year into :years&amp;nbsp; separated by ',' from temp where row le 5;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ods listing;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;* generates 5 plots;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc gplot data=air;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;plot air*date;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;by year;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;where year in (&amp;amp;years);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 20:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22450#M4928</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-03-05T20:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: limit the number of gplots</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22451#M4929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ... have you tried just using a format , for example the dates in SASHELP.AIR have year and month but you can plot by year on the x-axis ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;goptions reset=all;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;proc gplot data=sashelp.air;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;plot air*date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;format date year.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 21:01:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22451#M4929</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-03-05T21:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: limit the number of gplots</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22452#M4930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Actually my example does limit the number of displayed values as well as the range. The BY incremental value controls how many tick marks are displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for examle haxis = 0 to 100 by 50 would have 3 major tick marks at 0, 50 and 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looks like you may have x as a date value and a format of YYMMp8. You could try a YYQ to show year quarter values or YEAR. as MikeZdeb suggests.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 23:55:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/limit-the-number-of-gplots/m-p/22452#M4930</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-03-05T23:55:04Z</dc:date>
    </item>
  </channel>
</rss>

