<?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: Defining a Global Style for a Value in Graphics Template Language in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Defining-a-Global-Style-for-a-Value-in-Graphics-Template/m-p/451966#M15488</link>
    <description>&lt;P&gt;To add to ballardw's suggestion, you can also find information about how to store a discrete attribute map in a SAS data set and how to use it with GTL in &lt;A title="SAS® 9.4 Graph Template Language: User's Guide" href="http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=grstatug&amp;amp;docsetTarget=p0wv2bbjftizkpn1puokmcblrw15.htm#p0azckit1n9oihn0zb70obwvhay9" target="_blank"&gt;SAS® 9.4 Graph Template Language: User's Guide&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2018 16:04:31 GMT</pubDate>
    <dc:creator>sdengland</dc:creator>
    <dc:date>2018-04-06T16:04:31Z</dc:date>
    <item>
      <title>Defining a Global Style for a Value in Graphics Template Language</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Defining-a-Global-Style-for-a-Value-in-Graphics-Template/m-p/450614#M15462</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying to adopt the Graphics Template Language, and I'm used to using the DATTRMAP statement in PROC SGPLOT in examples such as the following to ensure that certain values always have specific styles.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*--Define attributes map data set--*/
data AttrMap;
  length id value linecolor markercolor $8;
  id='TYPE'; value='PUBLIC'; linecolor='Red';  markercolor='Red'; output;
  id='TYPE'; value='PRIVATE'; linecolor='Green';   markercolor='Green';  output;
  id='TYPE'; value='UD VALUE'; linecolor='Blue'; markercolor='Blue';output;
  run;



/*plot of in-state tuition at public schools*/
filename graphout 'tuition.png';
goptions reset=all device=png gsfname=graphout;
ods graphics /  width=5in height=3in antialiasmax=1100  ;
PROC SGPLOT DATA=AI.COSTS DATTRMAP=ATTRMAP;
WHERE TYPE IN ('PUBLIC' 'UD VALUE') AND COST_ITEM='In_Tuition';
SERIES X=YEAR Y = MEAN / group=type lineattrs=(thickness=3)attrid=Type markers;
LABEL cost_item = 'In-State Tuition';
FORMAT mean dollar10.;
yaxis values=(0 to 12000 by 1000) label='In-State Tuition';
TITLE 'Average In-State Tuition for ASQ Public Schools';
title2 'With Reference Line for University of Delaware';
run;
TITLE;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can someone point me to a similar resource that describes how to do this with PROC TEMPLATE in the graphics template language?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been using the DISCRETATTRMAP statement in PROC TEMPLATE (as in the following example), but I'm defining it each time I make a template. Is there a more efficient way to apply this style across multiple templates?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; discreteattrmap name="munchkin" / ignorecase=true ;
     value "UD Value" / markerattrs=(color=black symbol=circlefilled size=6pt) 
						   lineattrs=(color=blue thickness=3);
		 value "Benchmark Avg." / markerattrs=(color=black symbol=circlefilled size=6pt)
							lineattrs=(color=red thickness=3);
	   enddiscreteattrmap;

	   discreteattrvar attrvar=groupmarkers var=college attrmap="munchkin";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 13:15:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Defining-a-Global-Style-for-a-Value-in-Graphics-Template/m-p/450614#M15462</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2018-04-03T13:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a Global Style for a Value in Graphics Template Language</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Defining-a-Global-Style-for-a-Value-in-Graphics-Template/m-p/450658#M15463</link>
      <description>&lt;P&gt;Put the characteristics into a data set. Reference the data set in SGRENDER with the DATTRMAP= option. Reference the attribute id with DATTRVAR statement for the group variables. The variable(s) in the dattrvar statement either match the variable used in the template or use dynamic variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The online reference for DATTRVAR in the SGRENDER documentation shows an example. Note that the template does not have to reference the attribute map, sgrender makes the connection as long as the variables match.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 14:25:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Defining-a-Global-Style-for-a-Value-in-Graphics-Template/m-p/450658#M15463</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-03T14:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a Global Style for a Value in Graphics Template Language</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Defining-a-Global-Style-for-a-Value-in-Graphics-Template/m-p/451966#M15488</link>
      <description>&lt;P&gt;To add to ballardw's suggestion, you can also find information about how to store a discrete attribute map in a SAS data set and how to use it with GTL in &lt;A title="SAS® 9.4 Graph Template Language: User's Guide" href="http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=grstatug&amp;amp;docsetTarget=p0wv2bbjftizkpn1puokmcblrw15.htm#p0azckit1n9oihn0zb70obwvhay9" target="_blank"&gt;SAS® 9.4 Graph Template Language: User's Guide&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 16:04:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Defining-a-Global-Style-for-a-Value-in-Graphics-Template/m-p/451966#M15488</guid>
      <dc:creator>sdengland</dc:creator>
      <dc:date>2018-04-06T16:04:31Z</dc:date>
    </item>
  </channel>
</rss>

