<?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 Control x-axis label and tick spacing in time series proc sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Control-x-axis-label-and-tick-spacing-in-time-series-proc-sgplot/m-p/532083#M17745</link>
    <description>&lt;P&gt;I'm having zero success controlling the distance between x-axis ticks/labels. Here's my code, with different things I've tried like type=discrete, interval=week, values=(), etc...&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data = work.weather_adjustment_daily;
	vbar del_date / response = Weather_Adjustment;
	vline del_date / response = Temperature y2axis lineattrs = (thickness = 2);
	vline del_date / response = Temp_Norm y2axis lineattrs = (thickness = 2);
	vline del_date / response = Temp_One_Year_Ago y2axis lineattrs = (thickness = 2);
/*	xaxis type = discrete  interval = week */
/*	xaxis values = (%sysfunc(intnx('month', %sysfunc(today()), -2)) to %sysfunc(intnx('month', %sysfunc(today()), 2)) by 7)*/
/*	axis order = ('01Jan2018' to '01Jan2020' by 10);*/
	xaxis label = "Date";
	yaxis label = "Weather Adjustment (MW)";
	y2axis label = "Daily Mean Temperature";
	title "Daily Weather Adjustment and Temperature";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;My chart is below, with too many x-axis labels. I'm using SAS v9.3.&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26764iF141F67CD36A8214/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 01 Feb 2019 16:37:19 GMT</pubDate>
    <dc:creator>seanrez</dc:creator>
    <dc:date>2019-02-01T16:37:19Z</dc:date>
    <item>
      <title>Control x-axis label and tick spacing in time series proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Control-x-axis-label-and-tick-spacing-in-time-series-proc-sgplot/m-p/532083#M17745</link>
      <description>&lt;P&gt;I'm having zero success controlling the distance between x-axis ticks/labels. Here's my code, with different things I've tried like type=discrete, interval=week, values=(), etc...&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data = work.weather_adjustment_daily;
	vbar del_date / response = Weather_Adjustment;
	vline del_date / response = Temperature y2axis lineattrs = (thickness = 2);
	vline del_date / response = Temp_Norm y2axis lineattrs = (thickness = 2);
	vline del_date / response = Temp_One_Year_Ago y2axis lineattrs = (thickness = 2);
/*	xaxis type = discrete  interval = week */
/*	xaxis values = (%sysfunc(intnx('month', %sysfunc(today()), -2)) to %sysfunc(intnx('month', %sysfunc(today()), 2)) by 7)*/
/*	axis order = ('01Jan2018' to '01Jan2020' by 10);*/
	xaxis label = "Date";
	yaxis label = "Weather Adjustment (MW)";
	y2axis label = "Daily Mean Temperature";
	title "Daily Weather Adjustment and Temperature";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;My chart is below, with too many x-axis labels. I'm using SAS v9.3.&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26764iF141F67CD36A8214/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Feb 2019 16:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Control-x-axis-label-and-tick-spacing-in-time-series-proc-sgplot/m-p/532083#M17745</guid>
      <dc:creator>seanrez</dc:creator>
      <dc:date>2019-02-01T16:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Control x-axis label and tick spacing in time series proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Control-x-axis-label-and-tick-spacing-in-time-series-proc-sgplot/m-p/532092#M17746</link>
      <description>&lt;P&gt;You need to choose a different FITPOLICY on the XAXIS statement. For SAS 9.3, these are the policies supported:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;THIN&lt;BR /&gt;ROTATE&lt;BR /&gt;ROTATETHIN&lt;BR /&gt;STAGGER&lt;BR /&gt;STAGGERROTATE&lt;BR /&gt;STAGGERTHIN&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 16:51:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Control-x-axis-label-and-tick-spacing-in-time-series-proc-sgplot/m-p/532092#M17746</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-02-01T16:51:59Z</dc:date>
    </item>
  </channel>
</rss>

