<?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: Adding Background Color to Graph in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288886#M10203</link>
    <description>&lt;DIV class="lia-message-author-rank"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;Arodriguez,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;Thank you for your response!&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;I looked up&amp;nbsp;&lt;SPAN&gt;TMPLOUT= option. It seems to import the template into a *.sas file. Do you propose the following?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN&gt;Outside my SAS program, I export the template.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN&gt;Then, modify the template.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN&gt;finally, bring in the template?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN&gt;Please clarify&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="lia-message-author-avatar"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Tue, 02 Aug 2016 10:09:56 GMT</pubDate>
    <dc:creator>smajid</dc:creator>
    <dc:date>2016-08-02T10:09:56Z</dc:date>
    <item>
      <title>Adding Background Color to Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288442#M10197</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm creating a graph using&amp;nbsp;Proc SGPLOT. I'm adding this graph to a RTF document. I have attached my code as well as a screen snapshot of the graph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I would like to add background color to the graph. I tried using Proc Template to add background color but it doesn't seem to work. Can you please guide me as to what I may be doing wrong?&lt;/LI&gt;&lt;LI&gt;How do I remove the outer boundary of the graph? I suspect that once I get the Proc Template to work, it'll be possible.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thank you very much for your guidance!&lt;/P&gt;&lt;P&gt;SM&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12805iC77E7C1C06225E6E/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="HorizontalBarGraph_with_nobackground.jpg" title="HorizontalBarGraph_with_nobackground.jpg" /&gt;</description>
      <pubDate>Mon, 01 Aug 2016 02:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288442#M10197</guid>
      <dc:creator>smajid</dc:creator>
      <dc:date>2016-08-01T02:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Background Color to Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288552#M10201</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="userSuppliedValue"&gt;Now you are using SGPLOT, try to use the option&amp;nbsp;&lt;/SPAN&gt;TMPLOUT= to export the SGPLOT template and then try to add this option&amp;nbsp;BACKGROUNDCOLOR=&amp;nbsp;&lt;SPAN class="userSuppliedValue"&gt;style-reference&lt;/SPAN&gt; | &lt;SPAN class="userSuppliedValue"&gt;color.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2016 12:11:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288552#M10201</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2016-08-01T12:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Background Color to Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288588#M10202</link>
      <description>&lt;P&gt;What version of SAS are you using? There have been options added to SGPLOT that can do both of your items in a straightforward way.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2016 14:07:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288588#M10202</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-08-01T14:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Background Color to Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288886#M10203</link>
      <description>&lt;DIV class="lia-message-author-rank"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;Arodriguez,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;Thank you for your response!&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;I looked up&amp;nbsp;&lt;SPAN&gt;TMPLOUT= option. It seems to import the template into a *.sas file. Do you propose the following?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN&gt;Outside my SAS program, I export the template.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN&gt;Then, modify the template.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN&gt;finally, bring in the template?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN&gt;Please clarify&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="lia-message-author-avatar"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Aug 2016 10:09:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288886#M10203</guid>
      <dc:creator>smajid</dc:creator>
      <dc:date>2016-08-02T10:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Background Color to Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288889#M10204</link>
      <description>&lt;P&gt;DanH_sas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using SAS Studio v3.5. The sas engine is:&amp;nbsp;&lt;STRONG&gt;SAS release: 9.04.01M3P06242015&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It is the SAS OnDemand for Academics.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 10:11:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288889#M10204</guid>
      <dc:creator>smajid</dc:creator>
      <dc:date>2016-08-02T10:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Background Color to Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288891#M10205</link>
      <description>&lt;P&gt;Hi smajid,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, with TMPLOUT a .sas file is generated. This sas file contain the proc template necessary to generate the shell to produce your output. You could modify this code, including&amp;nbsp;the background. Each proc template give a name to the shell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template; 
  define statgraph _TMPLNAME_; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After that, you could use&amp;nbsp;a proc sgrender to use your original dataset and your modified template to produce the desired output.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgrender data=_IN_ template=_TMPLNAME_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that it is now clearer&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 10:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288891#M10205</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2016-08-02T10:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Background Color to Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288935#M10215</link>
      <description>&lt;P&gt;Great! Then, this will be straightforward:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. To get rid of the outer border, use the NOBORDER option on the ODS GRAPHICS statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ods graphics / noborder;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Use the BACKCOLOR option on the STYLEATTRS statement in PROC SGPLOT to set a background color:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; proc sgplot data=whatever;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; styleattrs backcolor=cxffffff;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; hbar ... ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other related options that might interest you are the WALLCOLOR option on the STYLEATTRS statement, as well as the NOWALL and NOBORDER options on the PROC SGPLOT statement. These "NO" options control the visibility of the wall fill area (NOWALL) and the wall border (NOBORDER).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 13:57:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/288935#M10215</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-08-02T13:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Background Color to Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/289417#M10226</link>
      <description>&lt;P&gt;DanH_sas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much! I tried your two recommendations and they worked. Appreciate your help a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SM&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 03:01:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/289417#M10226</guid>
      <dc:creator>smajid</dc:creator>
      <dc:date>2016-08-04T03:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Background Color to Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/289418#M10227</link>
      <description>&lt;DIV class="lia-message-heading lia-component-message-header"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-body lia-component-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;DIV class="lia-message-author-rank"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;Arodriguez,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;Thank you for the explanation! I now understand what you mean. I'm sure that what you suggested works. However, given that I had sas v9.4, the solution suggested by DanH_sas was a simpler one.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;Nevertheless, I appreciate your help. Thank you very much!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-author-rank"&gt;&lt;SPAN class="login-bold"&gt;&lt;SPAN class="login-bold"&gt;SM&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 04 Aug 2016 03:04:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-Background-Color-to-Graph/m-p/289418#M10227</guid>
      <dc:creator>smajid</dc:creator>
      <dc:date>2016-08-04T03:04:03Z</dc:date>
    </item>
  </channel>
</rss>

