<?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 making color assignments permanent in stacked graphics in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/making-color-assignments-permanent-in-stacked-graphics/m-p/16967#M342</link>
    <description>I'm using pattern assignments in gchart for observations in 6 categories - I have patterns 1-6.  I'm also creating multiple charts at once using the "by" statement (one chart for each group).  If a group does not have an observation in a category, then SAS reassigns what category a pattern refers to, and thus changes the color dynamic for the whole graph.  So, I'm making 50 graphs (one for each state), and I'm getting ~50 different color schemes for categories.  Is there a way to assign the colors to the categories, non-dynamically?&lt;BR /&gt;
&lt;BR /&gt;
Code:&lt;BR /&gt;
&lt;BR /&gt;
pattern1 v=solid c=yellow;&lt;BR /&gt;
pattern2 v=solid c=stlg;&lt;BR /&gt;
pattern3 v=solid c=steel;&lt;BR /&gt;
pattern4 v=solid c=LIPB;&lt;BR /&gt;
pattern5 v=solid c=orange;&lt;BR /&gt;
pattern6 v=solid c=lightgray;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc gbarline data=six;&lt;BR /&gt;
	by state;&lt;BR /&gt;
	bar graphcode/ sumvar= pcr_count &lt;BR /&gt;
	subgroup = subtype&lt;BR /&gt;
	clipref &lt;BR /&gt;
	width=5 &lt;BR /&gt;
	FRAME MIDPOINTS=5 TO 58 BY 1&lt;BR /&gt;
	type=sum&lt;BR /&gt;
	coutline=black&lt;BR /&gt;
	raxis=axis1 &lt;BR /&gt;
	maxis=axis2 &lt;BR /&gt;
	legend=legend1;&lt;BR /&gt;
&lt;BR /&gt;
 	plot  /  sumvar=flupos type=mean  &lt;BR /&gt;
	axis=axis3 &lt;BR /&gt;
	legend=legend2; &lt;BR /&gt;
&lt;BR /&gt;
run;quit;</description>
    <pubDate>Thu, 24 Feb 2011 17:30:16 GMT</pubDate>
    <dc:creator>ash</dc:creator>
    <dc:date>2011-02-24T17:30:16Z</dc:date>
    <item>
      <title>making color assignments permanent in stacked graphics</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/making-color-assignments-permanent-in-stacked-graphics/m-p/16967#M342</link>
      <description>I'm using pattern assignments in gchart for observations in 6 categories - I have patterns 1-6.  I'm also creating multiple charts at once using the "by" statement (one chart for each group).  If a group does not have an observation in a category, then SAS reassigns what category a pattern refers to, and thus changes the color dynamic for the whole graph.  So, I'm making 50 graphs (one for each state), and I'm getting ~50 different color schemes for categories.  Is there a way to assign the colors to the categories, non-dynamically?&lt;BR /&gt;
&lt;BR /&gt;
Code:&lt;BR /&gt;
&lt;BR /&gt;
pattern1 v=solid c=yellow;&lt;BR /&gt;
pattern2 v=solid c=stlg;&lt;BR /&gt;
pattern3 v=solid c=steel;&lt;BR /&gt;
pattern4 v=solid c=LIPB;&lt;BR /&gt;
pattern5 v=solid c=orange;&lt;BR /&gt;
pattern6 v=solid c=lightgray;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc gbarline data=six;&lt;BR /&gt;
	by state;&lt;BR /&gt;
	bar graphcode/ sumvar= pcr_count &lt;BR /&gt;
	subgroup = subtype&lt;BR /&gt;
	clipref &lt;BR /&gt;
	width=5 &lt;BR /&gt;
	FRAME MIDPOINTS=5 TO 58 BY 1&lt;BR /&gt;
	type=sum&lt;BR /&gt;
	coutline=black&lt;BR /&gt;
	raxis=axis1 &lt;BR /&gt;
	maxis=axis2 &lt;BR /&gt;
	legend=legend1;&lt;BR /&gt;
&lt;BR /&gt;
 	plot  /  sumvar=flupos type=mean  &lt;BR /&gt;
	axis=axis3 &lt;BR /&gt;
	legend=legend2; &lt;BR /&gt;
&lt;BR /&gt;
run;quit;</description>
      <pubDate>Thu, 24 Feb 2011 17:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/making-color-assignments-permanent-in-stacked-graphics/m-p/16967#M342</guid>
      <dc:creator>ash</dc:creator>
      <dc:date>2011-02-24T17:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: making color assignments permanent in stacked graphics</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/making-color-assignments-permanent-in-stacked-graphics/m-p/16968#M343</link>
      <description>It's a bit awkward/kludgy, but you're probably going to have to add some 'missing' values to your data ... each of the 50 states will have to have each of the 6 subtypes (with a sas 'missing' value for the pcr_count). -- There might be another way, but this is the technique I usually use.&lt;BR /&gt;
&lt;BR /&gt;
This should work ok, since you're doing a type=sum bar chart (whereas if you were doing a frequency count bar chart, you might have to be a little trickier).</description>
      <pubDate>Thu, 24 Feb 2011 18:25:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/making-color-assignments-permanent-in-stacked-graphics/m-p/16968#M343</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-02-24T18:25:21Z</dc:date>
    </item>
  </channel>
</rss>

