<?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: Can't get XAXIS with calendar dates to look the way I want in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775127#M22161</link>
    <description>&lt;P&gt;Also perhaps use the&amp;nbsp;&lt;SPAN style="color: inherit; font-family: inherit; font-size: 18px;"&gt;VALUESROTATE=&lt;/SPAN&gt;&lt;SPAN class="xisDoc-choice" style="color: inherit; font-family: inherit; font-size: 18px;"&gt;VERTICAL option.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Oct 2021 13:38:59 GMT</pubDate>
    <dc:creator>djrisks</dc:creator>
    <dc:date>2021-10-19T13:38:59Z</dc:date>
    <item>
      <title>PROC SGPLOT: Can't get XAXIS with calendar dates to look the way I want</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775116#M22157</link>
      <description>&lt;P&gt;I want year/quarter on the XAXIS, but the values on the axis is somehow "thinned" so only quarters 1 and 3 of each year are shown. I want all quarters (not just 1 and 3) to show, so the tick marks would be labelled 80Q1 80Q2 80Q3 80Q4 &lt;EM&gt;etc&lt;/EM&gt;., and I want the values to either be diagonal or rotated, but I can't seem to get it right. I'm sure I'm missing something simple. Tell me what I'm doing wrong. Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.citiqtr(where=('01JAN1980'd&amp;lt;=date&amp;lt;'01JAN1987'd));
    series x=date y=bpb;
    xaxis label="Year/Quarter" valuesformat=yyq4. interval=quarter fitpolicy=rotate;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 570px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64847i83BFC6A8491A4D5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:30:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775116#M22157</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-19T13:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: Can't get XAXIS with calendar dates to look the way I want</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775121#M22158</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;,&amp;nbsp;if you make the output size larger or the axis tick values smaller, then all the axis tick values can be displayed.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:34:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775121#M22158</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2021-10-19T13:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: Can't get XAXIS with calendar dates to look the way I want</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775124#M22159</link>
      <description>&lt;P&gt;I don't think that's the answer. I just tried it with&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics/height=9in width=12in;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and nothing changed as far as the x-axis tick marks and values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, even at the size I showed, you should be able to turn the x-axis text to squeeze more tick marks and their values in.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:39:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775124#M22159</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-19T13:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: Can't get XAXIS with calendar dates to look the way I want</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775126#M22160</link>
      <description>Maybe this could work out .&lt;BR /&gt;&lt;BR /&gt;    xaxis values=('01JAN1980'd to '01JAN1987'd by quarter) &lt;BR /&gt;label="Year/Quarter" valuesformat=yyq4. interval=quarter fitpolicy=rotate;&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775126#M22160</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-10-19T13:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: Can't get XAXIS with calendar dates to look the way I want</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775127#M22161</link>
      <description>&lt;P&gt;Also perhaps use the&amp;nbsp;&lt;SPAN style="color: inherit; font-family: inherit; font-size: 18px;"&gt;VALUESROTATE=&lt;/SPAN&gt;&lt;SPAN class="xisDoc-choice" style="color: inherit; font-family: inherit; font-size: 18px;"&gt;VERTICAL option.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775127#M22161</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2021-10-19T13:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: Can't get XAXIS with calendar dates to look the way I want</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775129#M22162</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.citiqtr(where=('01JAN1980'd&amp;lt;=date&amp;lt;'01JAN1987'd));
    series x=date y=bpb;
    xaxis values=('01JAN1980'd to '01JAN1987'd by quarter) label="Year/Quarter" valuesformat=yyq4. interval=quarter valuesrotate=vertical;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 559px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64848iB27B907D12CA6D20/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still not what I want&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:43:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775129#M22162</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-19T13:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: Can't get XAXIS with calendar dates to look the way I want</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775130#M22163</link>
      <description>&lt;P&gt;This example uses vertical x-axis tick values:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=sashelp.revhub2;&lt;BR /&gt;&amp;nbsp; scatter x=hub y=revenue / group=type groupdisplay=cluster clusterwidth=0.5;&lt;BR /&gt;&amp;nbsp; xaxis type=discrete valuesrotate=vertical fitpolicy=rotate valueattrs=(size=12);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:44:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775130#M22163</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2021-10-19T13:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: Can't get XAXIS with calendar dates to look the way I want</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775132#M22164</link>
      <description>&lt;P&gt;Here is my code. Did you miss some date in sashelp.citiqtr ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
do date='01JAN1980'd to '01JAN1987'd ;
bpb=1;
output;
end;

proc sgplot data=have;
    series x=date y=bpb;
    xaxis values=('01JAN1980'd to '01JAN1987'd by quarter) type=linear
label="Year/Quarter" valuesformat=yyq4.  fitpolicy=rotate;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1634651232787.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64849i38679A6BAFC10AF5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1634651232787.png" alt="Ksharp_0-1634651232787.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:47:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775132#M22164</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-10-19T13:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: Can't get XAXIS with calendar dates to look the way I want</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775133#M22165</link>
      <description>&lt;P&gt;And how to I get the format I want (yyq4.) with TYPE=DISCRETE?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:48:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775133#M22165</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-19T13:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: Can't get XAXIS with calendar dates to look the way I want</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775134#M22166</link>
      <description>&lt;P&gt;Okay,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;that works! I see that TYPE=LINEAR is somehow required&amp;nbsp; to produce the desired x-axis, although I'm not sure why. Nevertheless, I can just remember to use TYPE=LINEAR from now on, and everyone here will be smiling &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 13:53:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775134#M22166</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-19T13:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPLOT: Can't get XAXIS with calendar dates to look the way I want</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775141#M22167</link>
      <description>&lt;P&gt;something like that worked for me:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  set sashelp.citiqtr(where=('01JAN1980'd&amp;lt;=date&amp;lt;'01JAN1987'd));;
  format date yyq6.;
  keep date bpb;
run;

proc sgplot data=test;
    series x=date y=bpb;
    xaxis label="Year/Quarter" interval=quarter fitpolicy=rotate
    TYPE=DISCRETE VALUESROTATE=VERTICAL
    ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;B.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 14:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPLOT-Can-t-get-XAXIS-with-calendar-dates-to-look-the-way/m-p/775141#M22167</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2021-10-19T14:17:14Z</dc:date>
    </item>
  </channel>
</rss>

