<?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: Putting Percentages in Tile Charts in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Putting-Percentages-in-Tile-Charts/m-p/522708#M17584</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a new variable concatenating percent and class.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data naan_tilechart;
	set naan_tilechart;
	per = pop/total;
	format per percent9.1;
Class_new=cats(put(class,class.),'(',put(per,percent9.1),')');

run;

title1 "Native American/Alaskan Natives";
title2 "By Race and Hispanic Origin";
proc gtile data=naan_tilechart;
 	TILE pop
 	tileby=(class_new);
	format class class.;
label class_new="09"x; /* This will blank the label name*/
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25813iE4CAB8B4E78BAE50/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Dec 2018 21:22:13 GMT</pubDate>
    <dc:creator>SuryaKiran</dc:creator>
    <dc:date>2018-12-19T21:22:13Z</dc:date>
    <item>
      <title>Putting Percentages in Tile Charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Putting-Percentages-in-Tile-Charts/m-p/522693#M17582</link>
      <description>&lt;P&gt;Hi, SAS Users!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create a tile chart in which the tiles contain both the labels of the group they represent and the percentage that that group is of the total population.&amp;nbsp; Here's some code:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
*Figure 4:  Tile Chart w/ Relative Sizes of Native American Groups;
data naan_tilechart;
	input class pop total;
cards;
1 164038 1087183
2 486212 1087183
3 228101 1087183
4 208832 1087183
;
run;



data naan_tilechart;
	set naan_tilechart;
	per = pop/total;
	format per percent9.1;
run;

proc format;
	label class = "Race/Ethnicity Category"
		pop = "Count";
	value class
		1="1-Race, Non-Hisp"
		2="1-Race, Hisp"
		3="&amp;gt;1-Race, Non-Hisp"
		4="&amp;gt;1-Race, Hisp"
		;
run;


title1 "Native American/Alaskan Natives";
title2 "By Race and Hispanic Origin";
proc gtile data=naan_tilechart;
 	TILE pop
 	tileby=(class);
	format class class.;
run;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And here's the resulting tile chart:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25812iFAF7B4A4BBBD7356/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What I would like to do is (1) insert the percentages for each tile and (2) eliminate the--is it an axis label?--"class" above the upper left-hand corner of the chart.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 20:49:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Putting-Percentages-in-Tile-Charts/m-p/522693#M17582</guid>
      <dc:creator>dbcrow</dc:creator>
      <dc:date>2018-12-19T20:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Putting Percentages in Tile Charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Putting-Percentages-in-Tile-Charts/m-p/522708#M17584</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a new variable concatenating percent and class.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data naan_tilechart;
	set naan_tilechart;
	per = pop/total;
	format per percent9.1;
Class_new=cats(put(class,class.),'(',put(per,percent9.1),')');

run;

title1 "Native American/Alaskan Natives";
title2 "By Race and Hispanic Origin";
proc gtile data=naan_tilechart;
 	TILE pop
 	tileby=(class_new);
	format class class.;
label class_new="09"x; /* This will blank the label name*/
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25813iE4CAB8B4E78BAE50/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 21:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Putting-Percentages-in-Tile-Charts/m-p/522708#M17584</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-12-19T21:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Putting Percentages in Tile Charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Putting-Percentages-in-Tile-Charts/m-p/522730#M17585</link>
      <description>&lt;P&gt;Thanks, SuryaKiran-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there no data label option in PROC GTILE?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, how would I get the percentage on a separate line?&amp;nbsp; Your solution is great, but it looks a little cluttered to me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the patience.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 22:32:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Putting-Percentages-in-Tile-Charts/m-p/522730#M17585</guid>
      <dc:creator>dbcrow</dc:creator>
      <dc:date>2018-12-19T22:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Putting Percentages in Tile Charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Putting-Percentages-in-Tile-Charts/m-p/522746#M17586</link>
      <description>&lt;P&gt;And one other question (sorry to be such a bother):&amp;nbsp; how can I export the graph as an image with the title?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 23:09:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Putting-Percentages-in-Tile-Charts/m-p/522746#M17586</guid>
      <dc:creator>dbcrow</dc:creator>
      <dc:date>2018-12-19T23:09:33Z</dc:date>
    </item>
  </channel>
</rss>

