<?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 VBAR XAXIS Label Interval? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBAR-XAXIS-Label-Interval/m-p/842550#M23243</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173881"&gt;@Junyong&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First of all, thank you very much for providing readily usable example data and code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think adding this &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p07m2vpyq75fgan14m6g5pphnwlr.htm" target="_blank" rel="noopener"&gt;XAXIS statement&lt;/A&gt; to your PROC SGPLOT step will help:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;xaxis values=(5 to 50 by 5) type=linear valueshint;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The &lt;EM&gt;default&lt;/EM&gt; axis type in your case would be DISCRETE, not LINEAR, so that the VALUES= specification alone would also restrict the set of bars drawn. Without the VALUESHINT option SAS would not leave enough space for the bars with X values less than the first tick mark value (5).&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2022 18:24:33 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2022-11-04T18:24:33Z</dc:date>
    <item>
      <title>SGPLOT VBAR XAXIS Label Interval?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBAR-XAXIS-Label-Interval/m-p/842542#M23242</link>
      <description>&lt;P&gt;SGPLOT VBAR is drawing all the 50 bars needed, but can I just apply label intervals to the x-axis below so that it changes from 1, 2, 3, …, 48, 49, 50 to 5, 10, 15, …, 40, 45, 50, for example?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data SAMPLE;
    call streaminit(1);
    do X=1 to 50;
        do ITERATION=1 to 50;
            Y=rand('normal',X,X);
            output;
        end;
    end;
run;

ods results=off;
ods listing gpath='!userprofile\desktop\';
ods graphics/reset imagename='SGPLOT';

proc sgplot;
    vbar X/response=Y stat=mean limits=both;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPLOT.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76944i541E50F8BF5BA41F/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPLOT.png" alt="SGPLOT.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 17:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBAR-XAXIS-Label-Interval/m-p/842542#M23242</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2022-11-04T17:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT VBAR XAXIS Label Interval?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBAR-XAXIS-Label-Interval/m-p/842550#M23243</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/173881"&gt;@Junyong&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First of all, thank you very much for providing readily usable example data and code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think adding this &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p07m2vpyq75fgan14m6g5pphnwlr.htm" target="_blank" rel="noopener"&gt;XAXIS statement&lt;/A&gt; to your PROC SGPLOT step will help:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;xaxis values=(5 to 50 by 5) type=linear valueshint;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The &lt;EM&gt;default&lt;/EM&gt; axis type in your case would be DISCRETE, not LINEAR, so that the VALUES= specification alone would also restrict the set of bars drawn. Without the VALUESHINT option SAS would not leave enough space for the bars with X values less than the first tick mark value (5).&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 18:24:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-VBAR-XAXIS-Label-Interval/m-p/842550#M23243</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-11-04T18:24:33Z</dc:date>
    </item>
  </channel>
</rss>

