<?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 Formatting of x-axis labels in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Formatting-of-x-axis-labels/m-p/420365#M14475</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help while creating the graph plots.&amp;nbsp;I am using the following code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics on / width=&lt;STRONG&gt;8&lt;/STRONG&gt;in height=&lt;STRONG&gt;6&lt;/STRONG&gt;in outputfmt=gif imagemap=on border=off;&lt;/P&gt;&lt;P&gt;title1 "SGPLOT Output for &amp;amp;name.";&lt;/P&gt;&lt;P&gt;proc sgplot data=out_ds ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; series x=quarter y=default_flag/ legendlabel="Default Rate" markers lineattrs=(thickness=&lt;STRONG&gt;2&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; series x=quarter y=Varname/y2axis legendlabel="Unemployment rate" markers lineattrs=(thickness=&lt;STRONG&gt;2&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xaxis type=discrete display=(noline noticks) grid&amp;nbsp; label="Time Period";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yaxis display=(noline) grid&amp;nbsp; label="Default Rate" ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y2axis label="Unemployment rate";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The x-axis "quarter" contains the values 2001Q1, 2001Q2, 2001Q3, 2001Q4, 2002Q1..... so on&lt;/P&gt;&lt;P&gt;My input data contains values from 1995Q1 to 2020Q4. So the values of x-axis labels in the graph are coming too close. Since this is character values, I am not able to use values= option.&lt;/P&gt;&lt;P&gt;Is there any way , I can get skip quarters and print only years (with four ticks for each quarter).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or any other easy way so that the labels are not too close.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2017 05:24:03 GMT</pubDate>
    <dc:creator>UshaLatha</dc:creator>
    <dc:date>2017-12-12T05:24:03Z</dc:date>
    <item>
      <title>Formatting of x-axis labels</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Formatting-of-x-axis-labels/m-p/420365#M14475</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help while creating the graph plots.&amp;nbsp;I am using the following code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics on / width=&lt;STRONG&gt;8&lt;/STRONG&gt;in height=&lt;STRONG&gt;6&lt;/STRONG&gt;in outputfmt=gif imagemap=on border=off;&lt;/P&gt;&lt;P&gt;title1 "SGPLOT Output for &amp;amp;name.";&lt;/P&gt;&lt;P&gt;proc sgplot data=out_ds ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; series x=quarter y=default_flag/ legendlabel="Default Rate" markers lineattrs=(thickness=&lt;STRONG&gt;2&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; series x=quarter y=Varname/y2axis legendlabel="Unemployment rate" markers lineattrs=(thickness=&lt;STRONG&gt;2&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xaxis type=discrete display=(noline noticks) grid&amp;nbsp; label="Time Period";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yaxis display=(noline) grid&amp;nbsp; label="Default Rate" ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y2axis label="Unemployment rate";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The x-axis "quarter" contains the values 2001Q1, 2001Q2, 2001Q3, 2001Q4, 2002Q1..... so on&lt;/P&gt;&lt;P&gt;My input data contains values from 1995Q1 to 2020Q4. So the values of x-axis labels in the graph are coming too close. Since this is character values, I am not able to use values= option.&lt;/P&gt;&lt;P&gt;Is there any way , I can get skip quarters and print only years (with four ticks for each quarter).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or any other easy way so that the labels are not too close.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 05:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Formatting-of-x-axis-labels/m-p/420365#M14475</guid>
      <dc:creator>UshaLatha</dc:creator>
      <dc:date>2017-12-12T05:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting of x-axis labels</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Formatting-of-x-axis-labels/m-p/420368#M14476</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Your best option here is to use a data step to create a temporary data set that uses an informat on your "quarter" column to turn it into a true datetime value. Then, assign a YYQ. format to that column and let SGPLOT create a time axis for you on the X axis (remove the type=discrete). You might also need to set INTERVAL=QUARTER on that axis statement to get what you want.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 05:49:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Formatting-of-x-axis-labels/m-p/420368#M14476</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-12-12T05:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting of x-axis labels</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Formatting-of-x-axis-labels/m-p/420369#M14477</link>
      <description>&lt;P&gt;Thanks Dan !! this works perfectly..&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 06:12:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Formatting-of-x-axis-labels/m-p/420369#M14477</guid>
      <dc:creator>UshaLatha</dc:creator>
      <dc:date>2017-12-12T06:12:30Z</dc:date>
    </item>
  </channel>
</rss>

