<?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: Color of bars change after saving the bar graphs to a pdf in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Color-of-bars-change-after-saving-the-bar-graphs-to-a-pdf/m-p/279836#M9944</link>
    <description>&lt;P&gt;You also need to specify the style on your ODS PDF statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods pdf style=barcolors;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2016 20:10:45 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2016-06-23T20:10:45Z</dc:date>
    <item>
      <title>Color of bars change after saving the bar graphs to a pdf</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Color-of-bars-change-after-saving-the-bar-graphs-to-a-pdf/m-p/279834#M9943</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to save my bar graphs to a pdf with gray and white colors. So I use this style:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="sascode"&gt;proc template;&lt;BR /&gt;define style barcolors;    &lt;BR /&gt;parent = styles.htmlblue;
   style GraphData1  from GraphData1  / color = white contrastcolor=black;
   style GraphData2  from GraphData2  / color = white contrastcolor=black;
end;&lt;BR /&gt;run;&lt;BR /&gt;ods html style = barcolors;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, my sgplot&amp;nbsp;code is:&lt;/P&gt;&lt;P&gt;options nodate&amp;nbsp;nonumber;&lt;/P&gt;&lt;P&gt;ods pdf file=’bars.pdf’;&lt;/P&gt;&lt;P&gt;goptions device=pdf colors=(black) rotate=landscape;&lt;/P&gt;&lt;P&gt;title "........";&lt;/P&gt;&lt;P&gt;proc sgplot data = mydataset;&lt;/P&gt;&lt;P&gt;vbar&amp;nbsp;variable1/group=categoricalVariable response=PercentVariable groupdisplay=cluster;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run this code, in the "results viewer" window, I see the gray-white bars. But when I open the pdf file, the colors are blue and red. How can I save the output in PDF by keeping the styles of bars?&lt;/P&gt;&lt;P&gt;Any help is appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;proc sgplot;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 20:09:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Color-of-bars-change-after-saving-the-bar-graphs-to-a-pdf/m-p/279834#M9943</guid>
      <dc:creator>Mehdi_R</dc:creator>
      <dc:date>2016-06-23T20:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Color of bars change after saving the bar graphs to a pdf</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Color-of-bars-change-after-saving-the-bar-graphs-to-a-pdf/m-p/279836#M9944</link>
      <description>&lt;P&gt;You also need to specify the style on your ODS PDF statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods pdf style=barcolors;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 20:10:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Color-of-bars-change-after-saving-the-bar-graphs-to-a-pdf/m-p/279836#M9944</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-06-23T20:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Color of bars change after saving the bar graphs to a pdf</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Color-of-bars-change-after-saving-the-bar-graphs-to-a-pdf/m-p/279843#M9945</link>
      <description>&lt;P&gt;Thank you very much. It worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 20:23:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Color-of-bars-change-after-saving-the-bar-graphs-to-a-pdf/m-p/279843#M9945</guid>
      <dc:creator>Mehdi_R</dc:creator>
      <dc:date>2016-06-23T20:23:44Z</dc:date>
    </item>
  </channel>
</rss>

