<?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: datalabelfitpolicy= rotate and xaxis fitpolicy= rotate in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731240#M21282</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp; thanks, but I want the bars to be displayed vertically&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 04 Apr 2021 15:08:28 GMT</pubDate>
    <dc:creator>Anita_n</dc:creator>
    <dc:date>2021-04-04T15:08:28Z</dc:date>
    <item>
      <title>datalabelfitpolicy= rotate and xaxis fitpolicy= rotate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/730955#M21267</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;I have a problem using sgplot fitpolicy. Nothing&amp;nbsp; seems to work.&lt;/P&gt;
&lt;P&gt;I used datalabel and want the values to rotate so that they are horizontally displayed but it's not working (see myfilename1.pdf). Please not that this only seen when the results is outputted as pdf.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to suppress 0 values?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My second problem is the xaxis fitpolicy =rotate which also doesn't work. Attached are all my test data.&lt;/P&gt;
&lt;P&gt;I will appreciate any help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my code&lt;/P&gt;
&lt;PRE&gt;ods graphics/ imagefmt = pdf width= 3in height= 2in noborder push;
goptions device=pdfc gunit=pct rotate=landscape ftext= "verdana" ;
ods listing gpath="mypath/myfolder" ;
ods graphics on / reset=index imagename="myfilename";

footnote justify=center "Cases per Agegroup per year" ;
proc sgplot data=test dattrmap=myattrmap pad=(bottom=5%) noautolegend noborder; 
format sex $sex.;
xaxis grid type=discrete discreteorder=data;
vbar AGEGROUP /response=CASES_PER_AGEGROUP group=sex datalabel datalabelfitpolicy= rotate
datalabelattrs=(size=0.25 color=black family= "verdana") groupdisplay=cluster attrid=sex
barwidth=0.9 missing ; 
xaxis  display= (nolabel) valueattrs=(family="verdana" size=8pt) fitpolicy=rotate ValuesRotate=Vertical;
yaxis values=(0 to 250 by 5) display=(nolabel) valueattrs=(family="verdana" size=8pt) grid offsetmin=0.0 offsetmax=0.0;
keylegend / location=inside position=topleft across=0 title="" valueattrs=(size=10 family="verdana") outerpad=(top=0.2cm) noborder;
run;
footnote " ";&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Apr 2021 11:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/730955#M21267</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-04-02T11:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: datalabelfitpolicy= rotate and xaxis fitpolicy= rotate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731011#M21268</link>
      <description>&lt;P&gt;I think the xaxis fitpolicy=rotate will only be used if the graph can't fit the text in its default way. As a test, you could try making the graph much more narrow (where the text along the xaxis wouldn't fit), and see if the fitpolicy=rotate is then honored.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 17:35:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731011#M21268</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2021-04-02T17:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: datalabelfitpolicy= rotate and xaxis fitpolicy= rotate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731209#M21279</link>
      <description>okay, thanks</description>
      <pubDate>Sun, 04 Apr 2021 09:06:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731209#M21279</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-04-04T09:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: datalabelfitpolicy= rotate and xaxis fitpolicy= rotate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731225#M21281</link>
      <description>&lt;P&gt;If your goal is to clearly label the categories, you might consider exchanging the X and Y axes and using HBAR to draw the graph. For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.cars(where=(Origin^='Europe'));
   hbar Type / group=origin groupdisplay=cluster;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 04 Apr 2021 11:47:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731225#M21281</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-04-04T11:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: datalabelfitpolicy= rotate and xaxis fitpolicy= rotate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731240#M21282</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp; thanks, but I want the bars to be displayed vertically&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Apr 2021 15:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731240#M21282</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-04-04T15:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: datalabelfitpolicy= rotate and xaxis fitpolicy= rotate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731243#M21284</link>
      <description>&lt;P&gt;Rick is likely suggesting a better visual.&amp;nbsp; However, for vertical labels on x-axis, use FITPOLICY=ROTATEALWAYS and VALUESROTATE=VERTICAL&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=p07m2vpyq75fgan14m6g5pphnwlr.htm&amp;amp;locale=es#n1bkk2fwzh9l7in1que4qmkricsxa"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=p07m2vpyq75fgan14m6g5pphnwlr.htm&amp;amp;locale=es#n1bkk2fwzh9l7in1que4qmkricsxa&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=p07m2vpyq75fgan14m6g5pphnwlr.htm&amp;amp;locale=es#p00fgi68yedn0zn1f47lppup6z32a" target="_blank" rel="noopener"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=p07m2vpyq75fgan14m6g5pphnwlr.htm&amp;amp;locale=es#p00fgi68yedn0zn1f47lppup6z32a&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't have the latest version of SAS, you can save out the GTL by using TMPLOUT option, then add the appropriate options to the XAXISOPTS-&amp;gt;DISCRETEOPTS bundle for TICKVALUEFITPOLICY and TICKVALUEROTATION.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatgraph&amp;amp;docsetTarget=n0fksz728ytyz2n1ws13vlnkudyn.htm&amp;amp;locale=en#p0j3hje6pijt2tn0zdybmb8kkzhp" target="_blank"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatgraph&amp;amp;docsetTarget=n0fksz728ytyz2n1ws13vlnkudyn.htm&amp;amp;locale=en#p0j3hje6pijt2tn0zdybmb8kkzhp&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Apr 2021 15:25:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731243#M21284</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2021-04-04T15:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: datalabelfitpolicy= rotate and xaxis fitpolicy= rotate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731255#M21287</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54&lt;/a&gt;&amp;nbsp;Thanks, that worked fine. Any idea how I can rotate the&amp;nbsp;datalabelfitpolicy?&lt;/P&gt;
&lt;P&gt;It's just that my client wants the data to be displayed vertically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Apr 2021 16:23:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731255#M21287</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-04-04T16:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: datalabelfitpolicy= rotate and xaxis fitpolicy= rotate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731259#M21289</link>
      <description>&lt;P&gt;My guess would be DATALABELFITPOLICY=NONE. To remove the zero values, I suggest you can create a new character variable in your data (say 'label') which has the formatted summarized bar value by group and blank if zero. Then use DATALABEL=label.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n0p7vdd69sgf3wn1479qxqxuryrt.htm&amp;amp;locale=en#p07nkocs4zcjzgn14vy8joplowbdb" target="_blank" rel="noopener"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n0p7vdd69sgf3wn1479qxqxuryrt.htm&amp;amp;locale=en#p07nkocs4zcjzgn14vy8joplowbdb&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, these are also some benefits of HBAR which has a better arrangement of long tick values for many categories and better (horizontal) display of the bar label.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Apr 2021 18:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731259#M21289</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2021-04-04T18:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: datalabelfitpolicy= rotate and xaxis fitpolicy= rotate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731638#M21296</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;: Thank you very much&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 16:33:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/datalabelfitpolicy-rotate-and-xaxis-fitpolicy-rotate/m-p/731638#M21296</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-04-06T16:33:19Z</dc:date>
    </item>
  </channel>
</rss>

