<?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: clustered bargraph and tickmarks in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/clustered-bargraph-and-tickmarks/m-p/499282#M121</link>
    <description>&lt;P&gt;At least provide the code you are using now and some example data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also does your data always have exactly 2 bars in each "cluster"? If not then this may be a meaningless task. Depending on your data you may also appear to have "missing" bars if the value for the height is 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example of "missing bar".&lt;/P&gt;
&lt;PRE&gt;data example;
   input xvar groupvar responsevar;
datalines;
1  1  3
1  2  4
2  1  6
2  2  0
2  3  2
;
run;

proc sgplot data=example;
   vbar xvar/group=groupvar response= responsevar
             groupdisplay=cluster
   ;
run;&lt;/PRE&gt;</description>
    <pubDate>Wed, 26 Sep 2018 21:42:54 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-09-26T21:42:54Z</dc:date>
    <item>
      <title>clustered bargraph and tickmarks</title>
      <link>https://communities.sas.com/t5/New-SAS-User/clustered-bargraph-and-tickmarks/m-p/498946#M79</link>
      <description>&lt;P&gt;In the below image for clustered bar graph, I want to align the tickmarks between the two clustered bars. For some of them I see aligned and for others tickmark&amp;nbsp;are not aligned between the bars. I am using SAS 9.4 sgplot. Are there any options that would make this alignment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tickmarks.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23527i6251CC955EE6E15A/image-size/large?v=v2&amp;amp;px=999" role="button" title="tickmarks.JPG" alt="tickmarks.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 04:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/clustered-bargraph-and-tickmarks/m-p/498946#M79</guid>
      <dc:creator>sasuerrr</dc:creator>
      <dc:date>2018-09-26T04:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bargraph and tickmarks</title>
      <link>https://communities.sas.com/t5/New-SAS-User/clustered-bargraph-and-tickmarks/m-p/499069#M84</link>
      <description>&lt;P&gt;You would need to provide the exact values for the x-axis tickmarks in the VALUES= option of the XAXIS statement [1, 2].&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;It is possible to control the spacing of the tick marks on the time axis. The following statement uses the XAXIS statement to tell PROC SGPLOT to mark the axis at the start of each quarter:&lt;/P&gt;&lt;PRE class="xis-codeBlock"&gt;xaxis values=('1jan90'd to '1jul91'd by qtr);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;[2]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;References&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;[&lt;/U&gt;1]&amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#xaxis-stmt.htm" target="_self"&gt;PROC SGPLOT: XAXIS, X2AXIS, YAXIS, Y2AXIS Statements&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[2]&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/etsug/67525/HTML/default/viewer.htm#etsug_tsdata_sect035.htm" target="_self"&gt;Using PROC SGPLOT: Working with Time Series Data&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 14:38:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/clustered-bargraph-and-tickmarks/m-p/499069#M84</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2018-09-26T14:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bargraph and tickmarks</title>
      <link>https://communities.sas.com/t5/New-SAS-User/clustered-bargraph-and-tickmarks/m-p/499282#M121</link>
      <description>&lt;P&gt;At least provide the code you are using now and some example data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also does your data always have exactly 2 bars in each "cluster"? If not then this may be a meaningless task. Depending on your data you may also appear to have "missing" bars if the value for the height is 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example of "missing bar".&lt;/P&gt;
&lt;PRE&gt;data example;
   input xvar groupvar responsevar;
datalines;
1  1  3
1  2  4
2  1  6
2  2  0
2  3  2
;
run;

proc sgplot data=example;
   vbar xvar/group=groupvar response= responsevar
             groupdisplay=cluster
   ;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Sep 2018 21:42:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/clustered-bargraph-and-tickmarks/m-p/499282#M121</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-26T21:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: clustered bargraph and tickmarks</title>
      <link>https://communities.sas.com/t5/New-SAS-User/clustered-bargraph-and-tickmarks/m-p/499354#M146</link>
      <description>&lt;P&gt;Below is the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc template;&lt;BR /&gt; define statgraph vbarplot;&lt;BR /&gt; dynamic _ticklist_;&lt;BR /&gt; begingraph / collation=binary;&lt;BR /&gt; entrytitle '';&lt;BR /&gt; layout overlay / xaxisopts=(type=Discrete discreteOpts=(tickValueList=_ticklist_ tickValueListPolicy=Union tickvaluefitpolicy=rotate) )&lt;BR /&gt; yaxisopts=(labelFitPolicy=Split label = "Count" ) cycleattrs=true; &lt;BR /&gt; barchart X=chgcatn Y=respvar / primary=true Group=grpname NAME="VBAR" groupdisplay=cluster ;&lt;BR /&gt; discretelegend "VBAR"/ location=outside halign=center valign=bottom title=" ";&lt;BR /&gt; endlayout;&lt;BR /&gt; endgraph;&lt;BR /&gt; end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 02:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/clustered-bargraph-and-tickmarks/m-p/499354#M146</guid>
      <dc:creator>sasuerrr</dc:creator>
      <dc:date>2018-09-27T02:56:33Z</dc:date>
    </item>
  </channel>
</rss>

