<?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: X axis values in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-X-axis-values/m-p/420887#M14491</link>
    <description>&lt;P&gt;Convert those values to actual SAS dates. In a data step&lt;/P&gt;
&lt;P&gt;sasdate = input(put(date,6.),yymmn6.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Format the resulting date value as you would like it to appear either with a FORMAT statement or VALUESFORMAT on Xaxis.&lt;/P&gt;
&lt;P&gt;Use the VALUES option of the XAXIS statement to indicate that you want monthly tick marks such as Values=( '01JAN2016'd to '01Dec2017'd by month) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note the dates in the values statement have to be in 'ddMMMyyyy'd format as date literals (or the 2 digit year but I consider that sloppy), not the "formatted" value.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2017 16:33:00 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-12-13T16:33:00Z</dc:date>
    <item>
      <title>SGPLOT: X axis values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-X-axis-values/m-p/420881#M14490</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a two variables in a dataset.&lt;/P&gt;&lt;P&gt;One is YYYYMM. Ranging from 200601 to 200712.&lt;/P&gt;&lt;P&gt;Second is frequency of the variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the code for individual year eg 200601 to 200612(or 200701 to 200712) I get the chart with title "Individual Year"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=tst.numericfrequency;
series 	x=yyyymm 
	y=frequency ;
	xaxis values=(
		200601 200602 200603 200604 200605 200606 200607 200608 200609 200610 200611 200612 
/*		200701 200702 200703 200704 200705 200706 200707 200708 200709 200710 200711 200712 */
					) ;
where variable="numeric_variable" and variable_value=1;
title "Individual Year";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I run the code for 2 years all together, I get the chart shown below with title "Combined Multiple Years."&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Combined_Multiple_Years.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17200iDA3ED4D8E4BA7371/image-size/large?v=v2&amp;amp;px=999" role="button" title="Combined_Multiple_Years.PNG" alt="Combined_Multiple_Years.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Individual_Year_2006.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17201iEFFFD6F85E6CA5A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Individual_Year_2006.PNG" alt="Individual_Year_2006.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Individual_Year_2007.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17202i491D0B654FE5DE90/image-size/large?v=v2&amp;amp;px=999" role="button" title="Individual_Year_2007.PNG" alt="Individual_Year_2007.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are no error/warnings in log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know how can i fix it. I want the transition from 200612 to 200701 to be smooth and not that straight line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 16:23:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-X-axis-values/m-p/420881#M14490</guid>
      <dc:creator>arpitsharma27</dc:creator>
      <dc:date>2017-12-13T16:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT: X axis values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-X-axis-values/m-p/420887#M14491</link>
      <description>&lt;P&gt;Convert those values to actual SAS dates. In a data step&lt;/P&gt;
&lt;P&gt;sasdate = input(put(date,6.),yymmn6.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Format the resulting date value as you would like it to appear either with a FORMAT statement or VALUESFORMAT on Xaxis.&lt;/P&gt;
&lt;P&gt;Use the VALUES option of the XAXIS statement to indicate that you want monthly tick marks such as Values=( '01JAN2016'd to '01Dec2017'd by month) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note the dates in the values statement have to be in 'ddMMMyyyy'd format as date literals (or the 2 digit year but I consider that sloppy), not the "formatted" value.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 16:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGPLOT-X-axis-values/m-p/420887#M14491</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-13T16:33:00Z</dc:date>
    </item>
  </channel>
</rss>

