<?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: SAS9.4 Enterprise Guide 8.3 proc sgplot minor tick marks issue in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SAS9-4-Enterprise-Guide-8-3-proc-sgplot-minor-tick-marks-issue/m-p/915581#M24323</link>
    <description>&lt;P&gt;The key here is that a category axis for a line chart (VLINE/HLINE) or a bar chart (such as VBAR/HBAR) is "discrete" by default, even when presented with time data. However, if you just set TYPE=TIME on your XAXIS statement, the axis will treat the data as time data, and all of your time-axis options will work as expected. You can use a SERIES if your data is pre-summarized; but if it isn't, I would recommend switching back to a VLINE. If you are also overlaying a VBAR on the graph, you will want to switch it back.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2024 14:56:32 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2024-02-12T14:56:32Z</dc:date>
    <item>
      <title>SAS9.4 Enterprise Guide 8.3 proc sgplot minor tick marks issue</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS9-4-Enterprise-Guide-8-3-proc-sgplot-minor-tick-marks-issue/m-p/915539#M24318</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;I hope someone will be able to assist me. I'm trying to draw a bar graph using monthly data fromMarch2014 to Jan2024, but my x-axis minor tick values comes out all squashed.&lt;/P&gt;&lt;P&gt;My code is as follows:&lt;/P&gt;&lt;PRE&gt;proc sgplot data=INDIRECT_COSTS;&lt;BR /&gt;vline OBS_DATE / response=Indirect_Cost_Perc;&lt;BR /&gt;yaxis label="Indirect Cost%";&lt;BR /&gt;xaxis label="Observation Date" minor minorcount=10;&lt;BR /&gt;keylegend / noborder;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Graph1.PNG" style="width: 781px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93551iFBBBA3284C4AA75D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Graph1.PNG" alt="Graph1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried the following code, but then I loose the detail:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sgplot data=INDIRECT_COSTS;
   vline OBS_DATE / response=Indirect_Cost_Perc;
   yaxis label="Indirect Cost%";
   xaxis label="Observation Date"  interval=month values=('01JAN2006'd to '01JUN2023'd by 120);
   keylegend / noborder;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Graph2.PNG" style="width: 968px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93552i379A97E3DEAFF989/image-size/large?v=v2&amp;amp;px=999" role="button" title="Graph2.PNG" alt="Graph2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 11:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS9-4-Enterprise-Guide-8-3-proc-sgplot-minor-tick-marks-issue/m-p/915539#M24318</guid>
      <dc:creator>MarieRall</dc:creator>
      <dc:date>2024-02-12T11:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS9.4 Enterprise Guide 8.3 proc sgplot minor tick marks issue</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS9-4-Enterprise-Guide-8-3-proc-sgplot-minor-tick-marks-issue/m-p/915540#M24319</link>
      <description>&lt;P&gt;I found the solution. Instead of using "vline", I used "series" and that resolved my problem of the time series graphs. However I still have an issue if I want to create bars by date.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 11:56:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS9-4-Enterprise-Guide-8-3-proc-sgplot-minor-tick-marks-issue/m-p/915540#M24319</guid>
      <dc:creator>MarieRall</dc:creator>
      <dc:date>2024-02-12T11:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS9.4 Enterprise Guide 8.3 proc sgplot minor tick marks issue</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS9-4-Enterprise-Guide-8-3-proc-sgplot-minor-tick-marks-issue/m-p/915565#M24320</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/463663"&gt;@MarieRall&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/463663"&gt;@MarieRall&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I still have an issue if I want to create bars by date.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Here is an example plotting bars by date:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Create sample data for demonstration */

data have;
obs_date='01JAN2006'd;
Indirect_Cost_Perc=0.0064;
do i=1 to 208;
  sign=sign(Indirect_Cost_Perc);
  output;
  obs_date=intnx('month',obs_date,1);
  Indirect_Cost_Perc+rannor(1232176626)/1800;
end;
format obs_date date9. Ind: percent8.2;
run;

/* Create bar chart */

ods graphics / height=400 width=1300;
proc sgplot data=have;
vbarparm category=OBS_DATE response=Indirect_Cost_Perc / colormodel=(CXF2575F CXCAD5E5) colorresponse=sign;
yaxis label="Indirect Cost%";
xaxis label="Observation Date" interval=month fitpolicy=rotatethin;
keylegend / noborder;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vbarparm_chart.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93564i10FAC3CAA157ECDF/image-size/large?v=v2&amp;amp;px=999" role="button" title="vbarparm_chart.png" alt="vbarparm_chart.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Is there anything you would like to change?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 14:17:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS9-4-Enterprise-Guide-8-3-proc-sgplot-minor-tick-marks-issue/m-p/915565#M24320</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2024-02-12T14:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS9.4 Enterprise Guide 8.3 proc sgplot minor tick marks issue</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS9-4-Enterprise-Guide-8-3-proc-sgplot-minor-tick-marks-issue/m-p/915581#M24323</link>
      <description>&lt;P&gt;The key here is that a category axis for a line chart (VLINE/HLINE) or a bar chart (such as VBAR/HBAR) is "discrete" by default, even when presented with time data. However, if you just set TYPE=TIME on your XAXIS statement, the axis will treat the data as time data, and all of your time-axis options will work as expected. You can use a SERIES if your data is pre-summarized; but if it isn't, I would recommend switching back to a VLINE. If you are also overlaying a VBAR on the graph, you will want to switch it back.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 14:56:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS9-4-Enterprise-Guide-8-3-proc-sgplot-minor-tick-marks-issue/m-p/915581#M24323</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2024-02-12T14:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS9.4 Enterprise Guide 8.3 proc sgplot minor tick marks issue</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS9-4-Enterprise-Guide-8-3-proc-sgplot-minor-tick-marks-issue/m-p/916265#M24349</link>
      <description>Thank you this solution works perfectly</description>
      <pubDate>Thu, 15 Feb 2024 08:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS9-4-Enterprise-Guide-8-3-proc-sgplot-minor-tick-marks-issue/m-p/916265#M24349</guid>
      <dc:creator>MarieRall</dc:creator>
      <dc:date>2024-02-15T08:51:12Z</dc:date>
    </item>
  </channel>
</rss>

