<?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: Proc SGPlot and tick marks for date values in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/583618#M18772</link>
    <description>&lt;P&gt;Perfect! Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;</description>
    <pubDate>Fri, 23 Aug 2019 21:44:02 GMT</pubDate>
    <dc:creator>SSTEAD</dc:creator>
    <dc:date>2019-08-23T21:44:02Z</dc:date>
    <item>
      <title>Proc SGPlot and tick marks for date values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/402673#M13781</link>
      <description>&lt;P&gt;Please help me as these tick marks are driving me crazy!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with a sasdate variable called varDate. Every value of varDate is a date value that corresponds to the first of&amp;nbsp;the month and I only have one observation per date on a monthly basis starting with april 2005, may 2005 and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want a major tick that starts with the value 2005 representing&amp;nbsp;April 2005 and ends with&amp;nbsp;2017 but I also want minor ticks representing the months inbetween. How do I achieve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code and below that the output that it produces:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=myDatafile;
series x=varDate y=mar1 /markers markerattrs=(symbol=plus size=5);
xaxis interval=month label=' ' values=('01apr2005'd to '01SEP2017'd by 12) valuesformat=year4.;
yaxis label=' ' values=(110000 to 300000 by 20000);
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;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sgplot.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15743i0FD44FE336D944E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="sgplot.png" alt="sgplot.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 11:17:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/402673#M13781</guid>
      <dc:creator>vanja</dc:creator>
      <dc:date>2017-10-10T11:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPlot and tick marks for date values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/402771#M13783</link>
      <description>&lt;P&gt;What version of SAS are you using?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 14:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/402771#M13783</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-10-10T14:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPlot and tick marks for date values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/402776#M13784</link>
      <description>&lt;P&gt;values&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token datetime number"&gt;'01apr2005'd&lt;/SPAN&gt; to &lt;SPAN class="token datetime number"&gt;'01SEP2017'd&lt;/SPAN&gt; &lt;SPAN class="token statement"&gt;by&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;12&lt;/SPAN&gt;) is going to attempt to place a tick mark value every 12 days.&lt;/P&gt;
&lt;P&gt;You may want to use the INTERVAL=YEAR&amp;nbsp;, MINOR, to add minor tick marks, MINORCOUNT= , to specify the number of minor ticks, options instead of Values statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The version of SAS is going to limit the availability of these options though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 14:40:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/402776#M13784</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-10-10T14:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPlot and tick marks for date values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/402778#M13785</link>
      <description>&lt;P&gt;For this situation, you might want to use MINORINTERVAL=MONTH to make the minor ticks appear per month.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 14:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/402778#M13785</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-10-10T14:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPlot and tick marks for date values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/403033#M13786</link>
      <description>&lt;P&gt;Thank you so much for trying to help me! Your code seem to work, almost at least.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have modified the original code and moved the values to a where statement. Also, I have restricted the diagram to only show the last ten years. The minor tick marks are there but there are to many of them so they really doesn't make any sense. But still I want every year to be displayed on the x-axis. Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=_aux_ams;
where '01SEP2007'D &amp;lt;= dateVar &amp;lt;='01SEP2017'D
series x=dateVar y=mar1 /markers markerattrs=(symbol=plus size=5);
xaxis interval=year label=' ' valuesformat=year4. minor minorcount=120;
yaxis label=' ' values=(110000 to 300000 by 20000);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sgplot2.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15769iAD962333B1A23DC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="sgplot2.png" alt="sgplot2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 07:00:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/403033#M13786</guid>
      <dc:creator>vanja</dc:creator>
      <dc:date>2017-10-11T07:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPlot and tick marks for date values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/403034#M13787</link>
      <description>I think I did try that before and now I tried again, but it didn't do the trick. Thanks for trying!</description>
      <pubDate>Wed, 11 Oct 2017 07:02:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/403034#M13787</guid>
      <dc:creator>vanja</dc:creator>
      <dc:date>2017-10-11T07:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPlot and tick marks for date values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/403036#M13788</link>
      <description>&lt;P&gt;I am using SAS 9.4 M3&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2017 07:02:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/403036#M13788</guid>
      <dc:creator>vanja</dc:creator>
      <dc:date>2017-10-11T07:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPlot and tick marks for date values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/404434#M13810</link>
      <description>&lt;P&gt;Finally, I managed to get the graph I wanted. Since I realized that the minor ticks would be far too many, I decided to not use them. By changing the xaxis interval to 'auto' and use a year-format the graph looked presentable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=myData;
series x=dateVar y=mar1 /markers markerattrs=(symbol=plus size=5);
xaxis interval=auto label=' ' 
values=('01SEP2007'd to '01SEP2017'd by year) valuesformat=year4.;
yaxis label=' ' values=(110000 to 300000 by 20000);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Oct 2017 11:29:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/404434#M13810</guid>
      <dc:creator>vanja</dc:creator>
      <dc:date>2017-10-16T11:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPlot and tick marks for date values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/583600#M18770</link>
      <description>&lt;P&gt;I'm having the same problem with a mixed vbar vline plot. What I would like is a daily plot with ticks at the 1st and 16th of the month like the simple series plot. What I get is a complete mess of every date. I have tried a lot of interval/ minorintervla adjustments without result. Plus, refline does not seem to work with a vline/vbar plot. Help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s1"&gt;&lt;STRONG&gt;sgplot&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;data&lt;/SPAN&gt;=regression1 &lt;SPAN class="s2"&gt;noautolegend&lt;/SPAN&gt; ;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;vline&lt;/SPAN&gt; bDateIn / &lt;SPAN class="s2"&gt;response&lt;/SPAN&gt;=bCaseCnt ;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;vbar&lt;/SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;bDateIn / &lt;SPAN class="s2"&gt;response&lt;/SPAN&gt;=bHours &lt;SPAN class="s2"&gt;y2axis&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p2"&gt;/*xaxis interval=MONTH label = 'Date' ; */&lt;/P&gt;&lt;P class="p3"&gt;xaxisInterval&lt;SPAN class="s3"&gt;=auto &lt;/SPAN&gt;label&lt;SPAN class="s3"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;'Date'&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s2"&gt;refline&lt;/SPAN&gt; &lt;STRONG&gt;'01APR2019'd&lt;/STRONG&gt;&lt;SPAN class="s3"&gt; /&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;axis&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;=x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;yaxislabel&lt;SPAN class="s3"&gt; = &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;'Count'&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;y2axislabel&lt;SPAN class="s3"&gt; = &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;'Hours'&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p4"&gt;&lt;SPAN class="s2"&gt;refline&lt;/SPAN&gt; &lt;STRONG&gt;'01APR2019'd&lt;/STRONG&gt;&lt;SPAN class="s3"&gt; /&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;axis&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;=x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p5"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p5"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VolumePlots147.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31999i2795A2391452B60B/image-size/large?v=v2&amp;amp;px=999" role="button" title="VolumePlots147.png" alt="VolumePlots147.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VolumePlots149.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32000iA9296E8FBCB6C23B/image-size/large?v=v2&amp;amp;px=999" role="button" title="VolumePlots149.png" alt="VolumePlots149.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 20:49:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/583600#M18770</guid>
      <dc:creator>SSTEAD</dc:creator>
      <dc:date>2019-08-23T20:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPlot and tick marks for date values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/583611#M18771</link>
      <description>&lt;P&gt;On the XAXIS statement, set TYPE=TIME.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 21:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/583611#M18771</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-08-23T21:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPlot and tick marks for date values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/583618#M18772</link>
      <description>&lt;P&gt;Perfect! Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 21:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPlot-and-tick-marks-for-date-values/m-p/583618#M18772</guid>
      <dc:creator>SSTEAD</dc:creator>
      <dc:date>2019-08-23T21:44:02Z</dc:date>
    </item>
  </channel>
</rss>

