<?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 ODS PDF graph font scaling + axis issue in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/ODS-PDF-graph-font-scaling-axis-issue/m-p/681368#M20453</link>
    <description>&lt;P&gt;I am specifying 8 pt font for my bar graph, but when I open the resulting PDF file I can see that the data value labels are only 7.59 pt and the legend value labels are 7.2pt. I thought it might be a result of using the scale=on option, but when I change it to scale=off, the font sizes are all 9.09 pt.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The x-axis is also too thick, even though I have specified the thickness as 0.75 pt in the proc template. See screenshot and code below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bargraph.JPG" style="width: 763px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48969i689AA0334D1DA3D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="bargraph.JPG" alt="bargraph.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define style Custombar;
parent = Styles.Default; 
class graphaxislines/contrastcolor=black linethickness=0.75pt;
class graphbackground/color=white;
class graphwalls/frameborder=off;
class graphborderlines/contrastcolor=white linethickness=0;
class graphlabeltext/fontfamily=Arial fontsize=8.5pt;
class graphvaluetext/fontfamily=Arial fontsize=8.5pt;
class body/backgroundcolor=white;
end;
run;

PROC IMPORT OUT= WORK.age DATAFILE= "E:\SAS figures\Age data.xlsx" 
            DBMS=xlsx REPLACE;
     		GETNAMES=YES;
RUN;

ods _all_ close;
options nonumber nodate orientation=landscape papersize=letter nocenter
leftmargin=.5in rightmargin=.5in topmargin=.5in bottommargin=.5in;
ods pdf file="E:/SAS figures/fig2_pdf.pdf" dpi=300 notoc accessible=on;
ods pdf style=Custombar;
ods graphics/border=off;
ods graphics on/reset=all width=6.5in scale=on ANTIALIASMAX=100000;

proc sgplot data=age noborder nowall;
styleattrs datacolors=('#0060A9' '#00a2e5' '#6dc069' '#ffc222');
vbar Year / response=Percent group=Group grouporder=data groupdisplay=stack clusterwidth=1.0 barwidth=0.6 nooutline;
xaxis discreteorder=data display=(nolabel noticks) valueattrs=(family=Arial size=8.5pt);
yaxis label="Percent of all admissions aged 12 and older" values=(0 to 100 by 20) display=(noticks) labelattrs=(family=Arial size=8pt weight=normal) valueattrs=(family=Arial size=8pt);
keylegend/title="" valueattrs=(family=Arial size=8.5pt) noborder scale=1.25 autooutline linelength=30 fillaspect=golden;
run;

ods graphics off;
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Sep 2020 14:58:00 GMT</pubDate>
    <dc:creator>martyvd</dc:creator>
    <dc:date>2020-09-03T14:58:00Z</dc:date>
    <item>
      <title>ODS PDF graph font scaling + axis issue</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-PDF-graph-font-scaling-axis-issue/m-p/681368#M20453</link>
      <description>&lt;P&gt;I am specifying 8 pt font for my bar graph, but when I open the resulting PDF file I can see that the data value labels are only 7.59 pt and the legend value labels are 7.2pt. I thought it might be a result of using the scale=on option, but when I change it to scale=off, the font sizes are all 9.09 pt.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The x-axis is also too thick, even though I have specified the thickness as 0.75 pt in the proc template. See screenshot and code below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bargraph.JPG" style="width: 763px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48969i689AA0334D1DA3D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="bargraph.JPG" alt="bargraph.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define style Custombar;
parent = Styles.Default; 
class graphaxislines/contrastcolor=black linethickness=0.75pt;
class graphbackground/color=white;
class graphwalls/frameborder=off;
class graphborderlines/contrastcolor=white linethickness=0;
class graphlabeltext/fontfamily=Arial fontsize=8.5pt;
class graphvaluetext/fontfamily=Arial fontsize=8.5pt;
class body/backgroundcolor=white;
end;
run;

PROC IMPORT OUT= WORK.age DATAFILE= "E:\SAS figures\Age data.xlsx" 
            DBMS=xlsx REPLACE;
     		GETNAMES=YES;
RUN;

ods _all_ close;
options nonumber nodate orientation=landscape papersize=letter nocenter
leftmargin=.5in rightmargin=.5in topmargin=.5in bottommargin=.5in;
ods pdf file="E:/SAS figures/fig2_pdf.pdf" dpi=300 notoc accessible=on;
ods pdf style=Custombar;
ods graphics/border=off;
ods graphics on/reset=all width=6.5in scale=on ANTIALIASMAX=100000;

proc sgplot data=age noborder nowall;
styleattrs datacolors=('#0060A9' '#00a2e5' '#6dc069' '#ffc222');
vbar Year / response=Percent group=Group grouporder=data groupdisplay=stack clusterwidth=1.0 barwidth=0.6 nooutline;
xaxis discreteorder=data display=(nolabel noticks) valueattrs=(family=Arial size=8.5pt);
yaxis label="Percent of all admissions aged 12 and older" values=(0 to 100 by 20) display=(noticks) labelattrs=(family=Arial size=8pt weight=normal) valueattrs=(family=Arial size=8pt);
keylegend/title="" valueattrs=(family=Arial size=8.5pt) noborder scale=1.25 autooutline linelength=30 fillaspect=golden;
run;

ods graphics off;
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 14:58:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-PDF-graph-font-scaling-axis-issue/m-p/681368#M20453</guid>
      <dc:creator>martyvd</dc:creator>
      <dc:date>2020-09-03T14:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: ODS PDF graph font scaling + axis issue</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-PDF-graph-font-scaling-axis-issue/m-p/681612#M20457</link>
      <description>"The x-axis is also too thick,"&lt;BR /&gt;There is also a baseline on x-axis except xaxis line . Try this to remove it :&lt;BR /&gt;xaxis  nobaseline  &lt;BR /&gt;or&lt;BR /&gt;xaxis  baseline=no&lt;BR /&gt;&lt;BR /&gt;Sorry I forgot the right syntax in XAXIS statement .</description>
      <pubDate>Fri, 04 Sep 2020 12:25:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-PDF-graph-font-scaling-axis-issue/m-p/681612#M20457</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-09-04T12:25:30Z</dc:date>
    </item>
  </channel>
</rss>

