<?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: Is it possible to control colors from HBARPARM and SCATTER in one graph? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-colors-from-HBARPARM-and-SCATTER-in/m-p/641695#M19782</link>
    <description>Yes that worked perfect, thank you!</description>
    <pubDate>Tue, 21 Apr 2020 17:53:42 GMT</pubDate>
    <dc:creator>bstarr</dc:creator>
    <dc:date>2020-04-21T17:53:42Z</dc:date>
    <item>
      <title>Is it possible to control colors from HBARPARM and SCATTER in one graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-colors-from-HBARPARM-and-SCATTER-in/m-p/641669#M19778</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a bar graph developed almost how I need it (using PROC SGPLOT), but the colors are getting reset upon adding a SCATTER statement to my code. I'm trying add some reference points to each series.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data points appear to be getting plotted correctly, which makes me think it's possible to combine the two types, but the colors resetting makes me think it is not possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some code like the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
set sashelp.baseball;
	where team = "Chicago" and Div = "NE";
	ref1 = 15;
	ref2 = 20;
	ref3 = 25;
	ref4 = nHome + 5;
run;

proc sgplot data=sample;
	styleattrs 
		dataColors=(gray darkgray lightgray black)
		dataContrastColors=(gray darkgray lightgray black);

	hbarparm category = Position response=ref3 / barwidth=0.7;
	hbarparm category = Position response=ref2 / barwidth=0.7;
	hbarparm category = Position response=ref1 / barwidth=0.7;
	hbarparm category = Position response=nHome / barwidth=0.4;
	/*scatter y=Position x=ref4;*/
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Uncommenting the SCATTER statement plots the data points as intended, but makes all series light blue. Is it possible to control the colors in this scenario? Ideally I'd retain the colors of the bars and make the scatter plot dots orange.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate any help in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Brian&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 16:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-colors-from-HBARPARM-and-SCATTER-in/m-p/641669#M19778</guid>
      <dc:creator>bstarr</dc:creator>
      <dc:date>2020-04-21T16:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control colors from HBARPARM and SCATTER in one graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-colors-from-HBARPARM-and-SCATTER-in/m-p/641681#M19780</link>
      <description>&lt;P&gt;Have you tried data attribute maps?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=n1oq0axfb1tc1yn10kgw6dyuitk2.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=n1oq0axfb1tc1yn10kgw6dyuitk2.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried specifying the colours using fillattrs option on each HBARPARM and that didn't seem to work unfortunately.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 17:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-colors-from-HBARPARM-and-SCATTER-in/m-p/641681#M19780</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-21T17:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control colors from HBARPARM and SCATTER in one graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-colors-from-HBARPARM-and-SCATTER-in/m-p/641685#M19781</link>
      <description>&lt;P&gt;Add the CYCLEATTRS option to the PROC SGPLOT statement. What is happening is that CYCLEATTRS is automatically enabled when all of your plot statements are the same type. When you added the SCATTER statement, we could not automatically determine if CYCLEATTRS is what you wanted. You can always force it using the option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;BR /&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 17:19:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-colors-from-HBARPARM-and-SCATTER-in/m-p/641685#M19781</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-04-21T17:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to control colors from HBARPARM and SCATTER in one graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-colors-from-HBARPARM-and-SCATTER-in/m-p/641695#M19782</link>
      <description>Yes that worked perfect, thank you!</description>
      <pubDate>Tue, 21 Apr 2020 17:53:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Is-it-possible-to-control-colors-from-HBARPARM-and-SCATTER-in/m-p/641695#M19782</guid>
      <dc:creator>bstarr</dc:creator>
      <dc:date>2020-04-21T17:53:42Z</dc:date>
    </item>
  </channel>
</rss>

