<?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: Background color in SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72040#M2579</link>
    <description>Hi:&lt;BR /&gt;
  Can you look in the log for errors or notes. I'm guessing that your updated style template is not found on the server where output for the IDP is being created. You should see a note in the log to the effect:&lt;BR /&gt;
[pre]&lt;BR /&gt;
WARNING: Style xxxxxxxx not found; Default style will be used instead.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
You might want to work with Tech Support on this issue. Depending on when/how/where your template is being compiled and saved, you may need an ODS PATH statement so that the Stored Process can find the updated template.&lt;BR /&gt;
&lt;BR /&gt;
Have you tested your style template code in Base SAS (outside a Stored Process to make sure that the code has the desired result)??&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Mon, 29 Mar 2010 16:24:22 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-03-29T16:24:22Z</dc:date>
    <item>
      <title>Background color in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72037#M2576</link>
      <description>Hi all, &lt;BR /&gt;
I am using sgpot in a stored proc to output a report on the IDP. &lt;BR /&gt;
I can seem to figure out how to control the chart background color of my sgplot output. I an using the below template.&lt;BR /&gt;
&lt;BR /&gt;
proc template;&lt;BR /&gt;
	define style mystyle;&lt;BR /&gt;
		parent=styles.STATISTICAL;		&lt;BR /&gt;
		class body/&lt;BR /&gt;
			backgroundcolor=white&lt;BR /&gt;
			color=black&lt;BR /&gt;
			fontfamily="Verdana, Arial"		;&lt;BR /&gt;
		class systemtitle/&lt;BR /&gt;
			fontfamily="Verdana, Arial"&lt;BR /&gt;
			fontweight=bold&lt;BR /&gt;
			fontsize=14;&lt;BR /&gt;
	   class table/&lt;BR /&gt;
			backgroundcolor=white&lt;BR /&gt;
			bordercolor=black&lt;BR /&gt;
			borderstyle=solid&lt;BR /&gt;
			borderwidth=1pt		;&lt;BR /&gt;
		class header, footer/&lt;BR /&gt;
			backgroundcolor=green&lt;BR /&gt;
			fontfamily="Verdana, Arial"&lt;BR /&gt;
			fontweight=bold		;&lt;BR /&gt;
		class data/&lt;BR /&gt;
			fontfamily="Verdana, Arial";&lt;BR /&gt;
		style graphcolors from graphcolors /&lt;BR /&gt;
		   'gcdata1'=Darkseagreen&lt;BR /&gt;
		   'gcdata2'=Khaki&lt;BR /&gt;
		   'gcdata3'=Darkslateblue &lt;BR /&gt;
		   'gdata1'=Darkseagreen&lt;BR /&gt;
		   'gdata3'=Darkslateblue&lt;BR /&gt;
		   'gdata4'=CXDC531F&lt;BR /&gt;
		   'gdata2'=Khaki;&lt;BR /&gt;
	    style GraphBackground                                                 &lt;BR /&gt;
         "Graph backgroundcolor attributes" /                                      &lt;BR /&gt;
         backgroundcolor = colors("white")                                                            &lt;BR /&gt;
         textalign = L                                                             &lt;BR /&gt;
         verticalalign = B;&lt;BR /&gt;
&lt;BR /&gt;
	end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
I then pass this to the %STPBEGIN macro. %let _ODSSTYLE=mystyle;	&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
This section in my proc creates the plot:&lt;BR /&gt;
ods graphics  / reset width=500px height=333px noborder;&lt;BR /&gt;
proc sgplot data=repo.No_Activity_018  ;&lt;BR /&gt;
	vbar Inactive_Days_Bin /group=Plan   ;&lt;BR /&gt;
run; &lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
I can't find any reference to overridding the background color directly in SGPLOT in the SAS documentation.</description>
      <pubDate>Mon, 29 Mar 2010 14:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72037#M2576</guid>
      <dc:creator>Jaime</dc:creator>
      <dc:date>2010-03-29T14:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Background color in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72038#M2577</link>
      <description>I think if you remove the colors("white") and replace it with just "white" (no quotes), does it work for you?</description>
      <pubDate>Mon, 29 Mar 2010 14:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72038#M2577</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-03-29T14:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Background color in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72039#M2578</link>
      <description>No.&lt;BR /&gt;
&lt;BR /&gt;
  style GraphBackground                                                 &lt;BR /&gt;
         "Graph backgroundcolor attributes" /                                      &lt;BR /&gt;
         backgroundcolor = white                                                            &lt;BR /&gt;
         textalign = L                                                             &lt;BR /&gt;
         verticalalign = B;&lt;BR /&gt;
&lt;BR /&gt;
It compiles, but the color is still gray.</description>
      <pubDate>Mon, 29 Mar 2010 14:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72039#M2578</guid>
      <dc:creator>Jaime</dc:creator>
      <dc:date>2010-03-29T14:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Background color in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72040#M2579</link>
      <description>Hi:&lt;BR /&gt;
  Can you look in the log for errors or notes. I'm guessing that your updated style template is not found on the server where output for the IDP is being created. You should see a note in the log to the effect:&lt;BR /&gt;
[pre]&lt;BR /&gt;
WARNING: Style xxxxxxxx not found; Default style will be used instead.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
You might want to work with Tech Support on this issue. Depending on when/how/where your template is being compiled and saved, you may need an ODS PATH statement so that the Stored Process can find the updated template.&lt;BR /&gt;
&lt;BR /&gt;
Have you tested your style template code in Base SAS (outside a Stored Process to make sure that the code has the desired result)??&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 29 Mar 2010 16:24:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72040#M2579</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-03-29T16:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Background color in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72041#M2580</link>
      <description>OK. &lt;BR /&gt;
Well on that note, how do I view the log on a stored procedure running on Stored Procedure server?</description>
      <pubDate>Mon, 29 Mar 2010 16:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72041#M2580</guid>
      <dc:creator>Jaime</dc:creator>
      <dc:date>2010-03-29T16:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Background color in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72042#M2581</link>
      <description>Try setting the color to the COLOR attribute instead of the BACKGROUNDCOLOR attribute.  For ODS GRAPHICS, I believe is where the color os retrieved.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan</description>
      <pubDate>Mon, 29 Mar 2010 16:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72042#M2581</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-03-29T16:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Background color in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72043#M2582</link>
      <description>Disregard.&lt;BR /&gt;
DanH ur initial suggestion of  " backgroundcolor = white " worked.&lt;BR /&gt;
I did not see the results as I am using the tagsets.tableeditor template and this that script happpends to create a style tmeplate also called MyStyle. This was replacing my style template.&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Mon, 29 Mar 2010 17:02:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Background-color-in-SGPLOT/m-p/72043#M2582</guid>
      <dc:creator>Jaime</dc:creator>
      <dc:date>2010-03-29T17:02:30Z</dc:date>
    </item>
  </channel>
</rss>

