<?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 SGPLOT: grid not centred in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SGPLOT-grid-not-centred/m-p/787472#M251626</link>
    <description>&lt;P&gt;Hi Community!&lt;/P&gt;
&lt;P&gt;I'd like to have the grid at the white spaces between the bars. How can I achieve that?&lt;/P&gt;
&lt;P&gt;Here is my code and the result as PDF:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options papersize=(42cm 29.7cm);
ods graphics on / width=40cm height=28cm attrpriority=none;
options nodate nonumber orientation=landscape topmargin="1cm" center;
ods html close;
ods pdf file='Y:\...\Test.pdf';
PROC SGPLOT DATA = dataset;
xaxis display=(noticks) grid;
yaxis values=(0 to 4 by 0.5) offsetmin=0 valueattrs=(size=17);
styleattrs datacolors=(STLG BIGB STYPK LIBGR);
   vbar Lab / response=Wert group=Gr groupdisplay=cluster nooutline;
keylegend / noborder autooutline titleattrs=(size=15) valueattrs=(size=15);
run;
ods pdf close;
ods html;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Antje&lt;/P&gt;</description>
    <pubDate>Mon, 27 Dec 2021 16:53:56 GMT</pubDate>
    <dc:creator>AntjeWestphal</dc:creator>
    <dc:date>2021-12-27T16:53:56Z</dc:date>
    <item>
      <title>SGPLOT: grid not centred</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SGPLOT-grid-not-centred/m-p/787472#M251626</link>
      <description>&lt;P&gt;Hi Community!&lt;/P&gt;
&lt;P&gt;I'd like to have the grid at the white spaces between the bars. How can I achieve that?&lt;/P&gt;
&lt;P&gt;Here is my code and the result as PDF:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options papersize=(42cm 29.7cm);
ods graphics on / width=40cm height=28cm attrpriority=none;
options nodate nonumber orientation=landscape topmargin="1cm" center;
ods html close;
ods pdf file='Y:\...\Test.pdf';
PROC SGPLOT DATA = dataset;
xaxis display=(noticks) grid;
yaxis values=(0 to 4 by 0.5) offsetmin=0 valueattrs=(size=17);
styleattrs datacolors=(STLG BIGB STYPK LIBGR);
   vbar Lab / response=Wert group=Gr groupdisplay=cluster nooutline;
keylegend / noborder autooutline titleattrs=(size=15) valueattrs=(size=15);
run;
ods pdf close;
ods html;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Antje&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 16:53:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SGPLOT-grid-not-centred/m-p/787472#M251626</guid>
      <dc:creator>AntjeWestphal</dc:creator>
      <dc:date>2021-12-27T16:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT: grid not centred</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SGPLOT-grid-not-centred/m-p/787479#M251627</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40220"&gt;@AntjeWestphal&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can remove the GRID option from the XAXIS statement and create the new grid lines as &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n0ezn6n9coszztn100iyzhfvwnhp.htm" target="_blank" rel="noopener"&gt;reference lines&lt;/A&gt; instead (using the grid lines' style)&lt;FONT face="helvetica"&gt;:&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;refline Lab / axis=x discreteoffset=-0.5 lineattrs=GraphGridLines;
refline Lab / axis=x discreteoffset= 0.5 lineattrs=GraphGridLines;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Actually either of the two statements above is sufficient to draw the grid lines &lt;EM&gt;between&lt;/EM&gt; the groups of bars -- plus &lt;EM&gt;one&lt;/EM&gt; to the left of the first group or &lt;EM&gt;one&lt;/EM&gt; to the right of the last group, respectively. (To hide that possibly unwanted additional line, you could draw a white reference line over it.)&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 17:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SGPLOT-grid-not-centred/m-p/787479#M251627</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-12-27T17:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT: grid not centred</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SGPLOT-grid-not-centred/m-p/787626#M251694</link>
      <description>&lt;P&gt;Dear &lt;A class="trigger-hovercard" style="color: #0066cc;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733" target="_blank"&gt;FreelanceReinhard,&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks a lot! I tried around a bit and that works perfect:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;refline Lab / axis=x discreteoffset=-0.5 lineattrs=(color=darkgrey);
refline Lab / axis=x discreteoffset= 0.5 lineattrs=(color=darkgrey);
refline Lab / axis=x discreteoffset= 0.0 lineattrs=(color=white);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards and a guten Rutsch! &lt;span class="lia-unicode-emoji" title=":party_popper:"&gt;🎉&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":four_leaf_clover:"&gt;🍀&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Antje&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 15:09:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SGPLOT-grid-not-centred/m-p/787626#M251694</guid>
      <dc:creator>AntjeWestphal</dc:creator>
      <dc:date>2021-12-29T15:09:56Z</dc:date>
    </item>
  </channel>
</rss>

