<?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 Problem with Y-bar value display in hbar graph when exporting to pdf in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770254#M39598</link>
    <description>&lt;P&gt;I am using "sgplot" and making a "hbar" graph. Everything looks fine till I export it to pdf as part of a&amp;nbsp; multi-graph using "ods pdf file". The problem is with y-axis values. The values are scattered left and right.&lt;/P&gt;&lt;P&gt;I tried&amp;nbsp;VALUESHALIGN=left and that will adjust them to the left but with a huge distance from the axis and I don't know how to get rid of it.&lt;/P&gt;&lt;P&gt;I also tried&amp;nbsp;&amp;nbsp;VALUESHALIGN=right but that did not do anything. It did not change the values at all.&lt;/P&gt;&lt;P&gt;I appreciate your though on that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Sep 2021 14:43:16 GMT</pubDate>
    <dc:creator>szzzdhrd</dc:creator>
    <dc:date>2021-09-24T14:43:16Z</dc:date>
    <item>
      <title>Problem with Y-bar value display in hbar graph when exporting to pdf</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770254#M39598</link>
      <description>&lt;P&gt;I am using "sgplot" and making a "hbar" graph. Everything looks fine till I export it to pdf as part of a&amp;nbsp; multi-graph using "ods pdf file". The problem is with y-axis values. The values are scattered left and right.&lt;/P&gt;&lt;P&gt;I tried&amp;nbsp;VALUESHALIGN=left and that will adjust them to the left but with a huge distance from the axis and I don't know how to get rid of it.&lt;/P&gt;&lt;P&gt;I also tried&amp;nbsp;&amp;nbsp;VALUESHALIGN=right but that did not do anything. It did not change the values at all.&lt;/P&gt;&lt;P&gt;I appreciate your though on that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 14:43:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770254#M39598</guid>
      <dc:creator>szzzdhrd</dc:creator>
      <dc:date>2021-09-24T14:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Y-bar value display in hbar graph when exporting to pdf</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770262#M39601</link>
      <description>&lt;P&gt;Code please starting from ODS PDF statement. Data to plot would be helpful as data step code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: PDF by default uses a different ODS style so results often change from the results window appearance.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 15:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770262#M39601</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-24T15:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Y-bar value display in hbar graph when exporting to pdf</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770269#M39603</link>
      <description>&lt;P&gt;Thanks for the reply. Sorry I cannot put the data here for some work reasons.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;title "Uni";&lt;BR /&gt;ods pdf file="X:\reports\Year.pdf" ;&lt;BR /&gt;options orientation=portrait papersize=letter topmargin=0.001in bottommargin=0.001in leftmargin=0.001in rightmargin=0.001in;&lt;BR /&gt;ods layout Start width=8.5in height=11in ;&lt;BR /&gt;ods graphics / noborder;&lt;/P&gt;&lt;P&gt;proc sgplot data=DFac;&lt;BR /&gt;ods region x=3in y=0in width=3in height=3in;&lt;BR /&gt;title 'Faculty Race';&lt;BR /&gt;hbar frace / categoryorder=respdesc datalabel;&lt;BR /&gt;xaxis label="Count";&lt;BR /&gt;yaxis label="Ethnicity" display=(nolabel noticks) valueattrs=(color=black family=arial size=6pt weight=bold ) VALUESHALIGN=left;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;BR /&gt;proc sgpie data=DFac;&lt;BR /&gt;ods region x=0 y=22% width=45% height=20%;&lt;BR /&gt;title 'Faculty Sex';&lt;BR /&gt;styleattrs datacolors=(grey black bib);&lt;BR /&gt;donut fsex / holevalue /*holelabel='Count'*/ ringsize=0.5;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods layout end;&lt;BR /&gt;ods pdf close;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 15:15:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770269#M39603</guid>
      <dc:creator>szzzdhrd</dc:creator>
      <dc:date>2021-09-24T15:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Y-bar value display in hbar graph when exporting to pdf</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770303#M39605</link>
      <description>&lt;P&gt;Please post a picture of what you are seeing.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 17:07:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770303#M39605</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-09-24T17:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Y-bar value display in hbar graph when exporting to pdf</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770307#M39606</link>
      <description />
      <pubDate>Fri, 24 Sep 2021 17:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770307#M39606</guid>
      <dc:creator>szzzdhrd</dc:creator>
      <dc:date>2021-09-24T17:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Y-bar value display in hbar graph when exporting to pdf</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770331#M39607</link>
      <description>&lt;P&gt;If for no other reason then following code, it is not a good idea to place statements related to external items such as ODS LAYOUT or REGION information in the middle of a procedure like SGPLOT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 18:00:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770331#M39607</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-24T18:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Y-bar value display in hbar graph when exporting to pdf</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770332#M39608</link>
      <description>&lt;P&gt;I am certainly not an expert on the PDF destination, but try the following code to see if it give output close to what you expect:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data DFac;
call streaminit(1);
length frace $20 fsex $13;
array race [6] $20 ('White, Not Hispanic', 'Black, Not Hispanic', 'Asian', 'Not Specified', 'American Indian', 'Hawaiian');
array sex [3] $13 ('Male', 'Female', 'Not Specified');
do i = 1 to 1200;
   k = rand("table", 0.80, 0.10, 0.07, 0.01, 0.01, 0.01);
   frace = race[ k ];
   k = rand("table", 0.47, 0.48, 0.05);
   fsex = sex[ k ];
   output;
end;
keep i frace fsex;
run;

ods html close;
ods graphics / noborder;

title "Uni";
ods pdf file="Year.pdf" ;
options orientation=portrait papersize=letter topmargin=0.001in bottommargin=0.001in leftmargin=0.001in rightmargin=0.001in;
ods layout Start;

ods region x=3in y=0in width=3in height=3in;
title 'Faculty Race';
proc sgplot data=DFac;
hbar frace / categoryorder=respdesc datalabel;
xaxis label="Count";
yaxis label="Ethnicity" display=(nolabel noticks) valueattrs=(color=black family=arial size=6pt weight=bold ) VALUESHALIGN=left;
run;

ods region x=0in y=0in width=3in height=3in;
title 'Faculty Sex';
proc sgpie data=DFac;
styleattrs datacolors=(grey black bib);
donut fsex / holevalue /*holelabel='Count'*/ ringsize=0.5;
run;

ods layout end;
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The most likely explanation for the misaligned labels is bad data. Since I don't have your data, I cannot test, but you ought to be able to use PROC FREQ to see whether the categories for race are correctly formatted.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 18:05:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Problem-with-Y-bar-value-display-in-hbar-graph-when-exporting-to/m-p/770332#M39608</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-09-24T18:05:01Z</dc:date>
    </item>
  </channel>
</rss>

