<?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 Bar chart for every month (not midpoint) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Bar-chart-for-every-month-not-midpoint/m-p/851983#M336767</link>
    <description>&lt;P&gt;I have a bar chart of the following look:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SasStatistics_0-1672759126827.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79016iEE17B12552318170/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SasStatistics_0-1672759126827.png" alt="SasStatistics_0-1672759126827.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;produced with the following code:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
PROC GCHART DATA=MyData
;
	VBAR 
	 year_month
 /
	SUMVAR=count
	SUBGROUP=segment
	CLIPREF
FRAME	TYPE=SUM
	LEGEND=LEGEND1
	COUTLINE=BLACK
	RAXIS=AXIS1
	MAXIS=AXIS2
	LREF=1
	CREF=BLACK
	AUTOREF
;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any ideas on how I can produce the same bar chart BUT with the horizontal axis for each month (not midpoint of multiple months).&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jan 2023 15:20:12 GMT</pubDate>
    <dc:creator>SasStatistics</dc:creator>
    <dc:date>2023-01-03T15:20:12Z</dc:date>
    <item>
      <title>Bar chart for every month (not midpoint)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bar-chart-for-every-month-not-midpoint/m-p/851983#M336767</link>
      <description>&lt;P&gt;I have a bar chart of the following look:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SasStatistics_0-1672759126827.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79016iEE17B12552318170/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SasStatistics_0-1672759126827.png" alt="SasStatistics_0-1672759126827.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;produced with the following code:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
PROC GCHART DATA=MyData
;
	VBAR 
	 year_month
 /
	SUMVAR=count
	SUBGROUP=segment
	CLIPREF
FRAME	TYPE=SUM
	LEGEND=LEGEND1
	COUTLINE=BLACK
	RAXIS=AXIS1
	MAXIS=AXIS2
	LREF=1
	CREF=BLACK
	AUTOREF
;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any ideas on how I can produce the same bar chart BUT with the horizontal axis for each month (not midpoint of multiple months).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 15:20:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bar-chart-for-every-month-not-midpoint/m-p/851983#M336767</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2023-01-03T15:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart for every month (not midpoint)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bar-chart-for-every-month-not-midpoint/m-p/851984#M336768</link>
      <description>&lt;P&gt;No idea unless we can see your data that goes into this bar chart, although I am guessing that your variable year_month is not really a SAS date value. Please provide a portion of the data as WORKING data step code.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 15:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bar-chart-for-every-month-not-midpoint/m-p/851984#M336768</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-01-03T15:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart for every month (not midpoint)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bar-chart-for-every-month-not-midpoint/m-p/851985#M336769</link>
      <description>The format of the variable is YYMMN4. so it should be date. &lt;BR /&gt;Hopefully someone knows how to do it, if not I will have to try do some replicating example since I am using data from a database that is not available straight away.</description>
      <pubDate>Tue, 03 Jan 2023 15:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bar-chart-for-every-month-not-midpoint/m-p/851985#M336769</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2023-01-03T15:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart for every month (not midpoint)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bar-chart-for-every-month-not-midpoint/m-p/851990#M336772</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fake;
    do month = 1 to 16;
        date=intnx('month','01JAN2020'd,month,'b');
        count=round(rand('uniform',0,100));
        type='Mammal';
        output;
        count=round(rand('uniform',0,100));
        type='Lizard';
        output;
    end;
    format date yymmn4.;
run;

proc sgplot data=fake;
    vbar date/group=type response=count groupdisplay=stack;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Jan 2023 15:47:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bar-chart-for-every-month-not-midpoint/m-p/851990#M336772</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-01-03T15:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart for every month (not midpoint)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Bar-chart-for-every-month-not-midpoint/m-p/851993#M336773</link>
      <description>&lt;P&gt;Unfortunately with the very old GCHART procedure you have to show us the definitions of any AXIS, SYMBOL or Pattern statements you are using.&lt;/P&gt;
&lt;P&gt;The AXIS1 definition controls the values of your horizontal axis from the code you show. To change the VALUES displayed for the tickmarks you would need to modify that definition with an ORDER= showing the values that you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps: Order=('01JAN2021'd to '01Jan2023'd by month)&lt;/P&gt;
&lt;P&gt;Your months should indicate the dates, as a date literal as shown above, for the months that you want displayed. One of the nice things with SAS and use of actual date values is the option to use the BY &amp;lt;interval name&amp;gt; option to indicate the first of the month, quarter, year or what have you (time and datetime values allow other intervals like hour).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or in the example that &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; a similar XAXIS statement:&lt;/P&gt;
&lt;PRE&gt;xaxis values=('01JAN2021'd to '01Jan2023'd by month)&lt;/PRE&gt;
&lt;P&gt;The Xaxis and Yaxis statements in the newer, usually much&amp;nbsp; more flexible Sgplot, control the appearance of the axis instead of the remote often forgotten AXISn statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 16:14:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Bar-chart-for-every-month-not-midpoint/m-p/851993#M336773</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-01-03T16:14:12Z</dc:date>
    </item>
  </channel>
</rss>

