<?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 Mosaic Plot (Proc Freq) - changing tile colors in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/282985#M16306</link>
    <description>&lt;P&gt;I have created a MosaicPlot using the below code. Though, I would like to change the tile colors, say pink = light gray and blue = dark gray.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can go into the images properties after copying it, but my options are horrific: black/white or gray/gray. Also I added the line of code that Rick suggested on another post but I still get the obligatory title on top (&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Outputting-a-graph-from-PROC-FREQ/m-p/226441/highlight/true#M14375" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Outputting-a-graph-from-PROC-FREQ/m-p/226441/highlight/true#M14375&lt;/A&gt;). Dropping that would be great. Also bolding labels and increasing font would be nice. Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC FORMAT;
	VALUE	epab_1_fmt	1	=	"Confident"
						0	=	"Not Confident";
	VALUE	time_fmt	1	=	"0 Months"
						2	=	"3 Months"
						3	=	"6 Months"
						4	=	"12 Months";
RUN;
ODS GRAPHICS ON;
ods select MosaicPlot;
title;    /* clear the title */
%modtmplt(options=replace, template=Base.Freq.Graphics.MosaicPlot, steps=t);
PROC FREQ DATA=EPA_rev;
	TABLE (epab_1)*time / TREND MEASURES CL
          PLOTS=MosaicPlot;
	LABEL epab_1 = "EPA 1";
   	TEST SMDRC;
   	EXACT TREND / maxtime=60;
   	FORMAT	epab_1 	epab_1_fmt.;
	Format	time	time_fmt.;
RUN;
ODS GRAPHICS OFF;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12734i5586FD6D14028C81/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SAS Mosaic Pic.png" title="SAS Mosaic Pic.png" /&gt;</description>
    <pubDate>Fri, 08 Jul 2016 15:16:55 GMT</pubDate>
    <dc:creator>H</dc:creator>
    <dc:date>2016-07-08T15:16:55Z</dc:date>
    <item>
      <title>Mosaic Plot (Proc Freq) - changing tile colors</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/282985#M16306</link>
      <description>&lt;P&gt;I have created a MosaicPlot using the below code. Though, I would like to change the tile colors, say pink = light gray and blue = dark gray.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can go into the images properties after copying it, but my options are horrific: black/white or gray/gray. Also I added the line of code that Rick suggested on another post but I still get the obligatory title on top (&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Outputting-a-graph-from-PROC-FREQ/m-p/226441/highlight/true#M14375" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Outputting-a-graph-from-PROC-FREQ/m-p/226441/highlight/true#M14375&lt;/A&gt;). Dropping that would be great. Also bolding labels and increasing font would be nice. Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC FORMAT;
	VALUE	epab_1_fmt	1	=	"Confident"
						0	=	"Not Confident";
	VALUE	time_fmt	1	=	"0 Months"
						2	=	"3 Months"
						3	=	"6 Months"
						4	=	"12 Months";
RUN;
ODS GRAPHICS ON;
ods select MosaicPlot;
title;    /* clear the title */
%modtmplt(options=replace, template=Base.Freq.Graphics.MosaicPlot, steps=t);
PROC FREQ DATA=EPA_rev;
	TABLE (epab_1)*time / TREND MEASURES CL
          PLOTS=MosaicPlot;
	LABEL epab_1 = "EPA 1";
   	TEST SMDRC;
   	EXACT TREND / maxtime=60;
   	FORMAT	epab_1 	epab_1_fmt.;
	Format	time	time_fmt.;
RUN;
ODS GRAPHICS OFF;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12734i5586FD6D14028C81/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SAS Mosaic Pic.png" title="SAS Mosaic Pic.png" /&gt;</description>
      <pubDate>Fri, 08 Jul 2016 15:16:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/282985#M16306</guid>
      <dc:creator>H</dc:creator>
      <dc:date>2016-07-08T15:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Mosaic Plot (Proc Freq) - changing tile colors</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/282993#M16310</link>
      <description>Hi: This blog describes using Graph Template Language to alter the colors of the Mosaic Plot:&lt;BR /&gt;&lt;A href="http://blogs.sas.com/content/iml/2013/11/06/how-to-specify-mosaic-plot-colors-in-sas.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2013/11/06/how-to-specify-mosaic-plot-colors-in-sas.html&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;For more help with GTL and/or Mosaic plots, you might want to post this question in the ODS Graphics and SAS/GRAPH forum.&lt;BR /&gt;cynthia</description>
      <pubDate>Fri, 08 Jul 2016 15:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/282993#M16310</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-07-08T15:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Mosaic Plot (Proc Freq) - changing tile colors</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/282997#M16311</link>
      <description>&lt;P&gt;Thank you. I will examine the link and update you all on my questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Though, I have entered the world of the ODS Graphics Editior! It seems like the right place, but perhaps it only augments the graph and won't let me manipulate its current content?&amp;nbsp; Any feedback on how the Editor may help?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 15:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/282997#M16311</guid>
      <dc:creator>H</dc:creator>
      <dc:date>2016-07-08T15:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Mosaic Plot (Proc Freq) - changing tile colors</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/283000#M16312</link>
      <description>&lt;P&gt;I just reviewed the webpage and this should definitly help (given that I can figure it out). I am gonna move on to something else until I have more time to come back to this and determine how to use all dark grays for epa_b = 1 and light gray for its complement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and I will likely have follow-up questions early next week.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 16:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/283000#M16312</guid>
      <dc:creator>H</dc:creator>
      <dc:date>2016-07-08T16:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Mosaic Plot (Proc Freq) - changing tile colors</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/283003#M16313</link>
      <description>Hi:&lt;BR /&gt;  I think of the Editor as something to be used for 1-time changes. So, for example, if you change the colors TODAY, then next month when you run the graph, on next month's data you'll have to change the colors in the Editor again. This might be OK one or 2 times, but in the long run you probably do NOT want to sign up for modifying the colors in the Editor EVERY time you run the graph.&lt;BR /&gt; &lt;BR /&gt;I like to use the Editor for annotating "blips" like one month sales are very low because a flood closed the office -- you might want to put that on the graph 1 time as an annotation and that would be the kind of thing I might do in the Editor. but if I needed that annotation to be on the graph EVERY month, then I'd find another way to add the note to the graph (either ANNOTATE or an INSET box).&lt;BR /&gt;&lt;BR /&gt;cynthia&lt;BR /&gt;&lt;BR /&gt;If you do have GTL questions, it really would be better to post them in the ODS Graphics and SAS/GRAPH forum. That's where all the graph folks hang out.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Fri, 08 Jul 2016 16:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/283003#M16313</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-07-08T16:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Mosaic Plot (Proc Freq) - changing tile colors</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/287306#M16470</link>
      <description>&lt;P&gt;Below gets me closer to my desired output. I would like to increase the label's font size and attr marker (which are words) font size.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting confused since I use layout region and most examples I see are layout overlay, and I don't know how to incoporate both.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=epa_rev;
	by descending epab_13 time;
run;
proc freq data=epa_rev order=data;
tables time*epab_13/ norow cellchi2 expected stdres crosslist;
ods output CrossList=FreqList(where=(Expected&amp;gt;0));
run;
 
/* color by response (notice that PROC FREQ reverses Y axis) */
proc template;
  define statgraph mosaicPlotParm;
    begingraph;
      layout region;
	    MosaicPlotParm category=(time epab_13) count=Frequency /
            colorresponse=epab_13 name="mosaic" colormodel=twocoloraltramp;
		 endlayout;
    endgraph;
  end;
run;
proc sgrender data=FreqList template=mosaicPlotParm;
format time time_fmt.;
FORMAT	epab_13 	epab_1_fmt.;
LABEL epab_13 = '';
LABEL TIME = "Time (days)";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;P.S., I would prefer the colors to be black and white, but currently I can just save this output on the gray scale as a work around.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 18:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/287306#M16470</guid>
      <dc:creator>H</dc:creator>
      <dc:date>2016-07-26T18:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Mosaic Plot (Proc Freq) - changing tile colors</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/287315#M16471</link>
      <description>&lt;P&gt;Alright, I figured out the font question. Thought if anyone has an approach to make my binary outcome group gray and light gray on the graph I would be 1 step closer to the output I had been desiring.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
  define statgraph mosaicPlotParm;
    begingraph;
      layout region;
	    MosaicPlotParm category=(time epab_13) count=Frequency /
            colorresponse=epab_13 name="mosaic" colormodel=twocoloraltramp
			  labelattrs=(size=12pt)
			valueattrs=(size=12pt);

			 endlayout;
    endgraph;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 19:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Mosaic-Plot-Proc-Freq-changing-tile-colors/m-p/287315#M16471</guid>
      <dc:creator>H</dc:creator>
      <dc:date>2016-07-26T19:21:27Z</dc:date>
    </item>
  </channel>
</rss>

