<?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: displaying months as intervals between years on the xaxis sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/displaying-months-as-intervals-between-years-on-the-xaxis-sgplot/m-p/845460#M23326</link>
    <description>Thankyou</description>
    <pubDate>Mon, 21 Nov 2022 13:08:56 GMT</pubDate>
    <dc:creator>Anita_n</dc:creator>
    <dc:date>2022-11-21T13:08:56Z</dc:date>
    <item>
      <title>displaying months as intervals between years on the xaxis sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/displaying-months-as-intervals-between-years-on-the-xaxis-sgplot/m-p/845432#M23323</link>
      <description>&lt;P&gt;if I have on the xaxis a list of years like 2001-2010 and I want to display for example between each year months 1-12 as interval. How can I do this? I used something like minor minorcount=12, which quiet displays the 12 ticks between the years but the plot isn't showing. Maybe am doing something wrong. Any help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
set sashelp.countseries;
format month_year mmyyn6.;
month_year=date;
where units in (0, 2, 3, 4);
run;


proc sgplot data=have;
scatter y=units x=month_year /markerattrs=(symbol=trianglefilled size=8 color=red );
xaxis label='years' values=(2004 to 2012 by 1) minor minorcount=12; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For example if the value of month_year=042004. I will like the plot to start on the fourth minor tick between 2004 and 2005&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 09:21:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/displaying-months-as-intervals-between-years-on-the-xaxis-sgplot/m-p/845432#M23323</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2022-11-21T09:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: displaying months as intervals between years on the xaxis sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/displaying-months-as-intervals-between-years-on-the-xaxis-sgplot/m-p/845445#M23324</link>
      <description>&lt;P&gt;You don't need to convert the 'date' variable to anything. PROC SGPLOT knows how to plot dates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want major tick marks to indicate January, there are 11 minor tick marks (not 12) between the major ticks.&lt;/P&gt;
&lt;P&gt;You can use the MIN= option on the XAXIS statement to specify the minimum value of an axis. For a date variable, you could use something like MIN='01Apr2004'd&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
set sashelp.countseries;
where units in (0, 2, 3, 4);
run;

proc sgplot data=have;
scatter y=units x=date /markerattrs=(symbol=trianglefilled size=8 color=red );
xaxis label='years' minor minorcount=11 min='01Apr2004'd; 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Nov 2022 11:04:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/displaying-months-as-intervals-between-years-on-the-xaxis-sgplot/m-p/845445#M23324</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-11-21T11:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: displaying months as intervals between years on the xaxis sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/displaying-months-as-intervals-between-years-on-the-xaxis-sgplot/m-p/845460#M23326</link>
      <description>Thankyou</description>
      <pubDate>Mon, 21 Nov 2022 13:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/displaying-months-as-intervals-between-years-on-the-xaxis-sgplot/m-p/845460#M23326</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2022-11-21T13:08:56Z</dc:date>
    </item>
  </channel>
</rss>

