<?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: How to change  the font attributes of the gradlegend? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-the-font-attributes-of-the-gradlegend/m-p/638595#M19742</link>
    <description>&lt;P&gt;The SGPLOT "GRADLEGEND Statement" documentation has a link to "Optional arguments"&amp;nbsp; The link incorrectly takes you to the optional arguments of the "KEYLEGEND Statement".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SGPLOT GRADLEGEND Statement does not support the / VALUEATTRS= option.&amp;nbsp; This could be a development oversight, or by choice -- who knows ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SGPLOT statements are interfaces that surface the very wide capabilities of the Graphics Template Language (GTL) and there are places such as this where some GTL functionality is NOT surfaced.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your situation, you can drop down to GTL and write template code that SGRENDER uses to produce the same plot AND supports changing the size of legend values.&amp;nbsp; The important GTL statements you will use are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;SCATTERPLOT, and&lt;/LI&gt;
&lt;LI&gt;CONTINUOUSLEGEND&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc template;
  define statgraph gridly;
    begingraph;
      layout overlay;

        scatterplot X=Height Y=Weight /
          colorresponse=density
          markerattrs=(symbol=squarefilled size=6px)
          name="sp"
        ; 
        continuouslegend "sp" /
          valueattrs=(size=16pt)          /* Larger font size for legend values */
        ;
      endlayout;   
    endgraph;
  end;
run;

proc sgrender data=sashelp.gridded template=gridly;
  where count &amp;gt; 0;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardADeVenezia_0-1586412560545.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38084i3AC41E46A253937A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardADeVenezia_0-1586412560545.png" alt="RichardADeVenezia_0-1586412560545.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Apr 2020 06:09:48 GMT</pubDate>
    <dc:creator>RichardDeVen</dc:creator>
    <dc:date>2020-04-09T06:09:48Z</dc:date>
    <item>
      <title>How to change  the font attributes of the gradlegend?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-the-font-attributes-of-the-gradlegend/m-p/590628#M18898</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.gridded(where=(count&amp;gt;0));
  scatter x=height y=weight /
       colorresponse=density  name="scatter"
       markerattrs=(symbol=squarefilled size=6px);
  gradlegend "scatter"  ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I wanted to enlarge the word in the&amp;nbsp;gradlegend.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image 003.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32655iF932282833E0FFB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image 003.png" alt="Image 003.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It still can't solve the problem by using the VALUEATTRS= option (&lt;A href="https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n0pejjes5ug1j2n1roobaiuj9w60.htm&amp;amp;docsetVersion=3.2&amp;amp;locale=en#p0oobfm228sky8n1gtfyms7r0x5x" target="_self"&gt;see here&lt;/A&gt;).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;gradlegend "scatter"/ valueattrs=(size=16);&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&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 004.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32656i4EBC74C14E3E2D3A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image 004.png" alt="Image 004.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Sep 2019 16:18:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-change-the-font-attributes-of-the-gradlegend/m-p/590628#M18898</guid>
      <dc:creator>Cingchih</dc:creator>
      <dc:date>2019-09-21T16:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to change  the font attributes of the gradlegend?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-the-font-attributes-of-the-gradlegend/m-p/638595#M19742</link>
      <description>&lt;P&gt;The SGPLOT "GRADLEGEND Statement" documentation has a link to "Optional arguments"&amp;nbsp; The link incorrectly takes you to the optional arguments of the "KEYLEGEND Statement".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SGPLOT GRADLEGEND Statement does not support the / VALUEATTRS= option.&amp;nbsp; This could be a development oversight, or by choice -- who knows ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SGPLOT statements are interfaces that surface the very wide capabilities of the Graphics Template Language (GTL) and there are places such as this where some GTL functionality is NOT surfaced.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your situation, you can drop down to GTL and write template code that SGRENDER uses to produce the same plot AND supports changing the size of legend values.&amp;nbsp; The important GTL statements you will use are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;SCATTERPLOT, and&lt;/LI&gt;
&lt;LI&gt;CONTINUOUSLEGEND&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc template;
  define statgraph gridly;
    begingraph;
      layout overlay;

        scatterplot X=Height Y=Weight /
          colorresponse=density
          markerattrs=(symbol=squarefilled size=6px)
          name="sp"
        ; 
        continuouslegend "sp" /
          valueattrs=(size=16pt)          /* Larger font size for legend values */
        ;
      endlayout;   
    endgraph;
  end;
run;

proc sgrender data=sashelp.gridded template=gridly;
  where count &amp;gt; 0;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardADeVenezia_0-1586412560545.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38084i3AC41E46A253937A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardADeVenezia_0-1586412560545.png" alt="RichardADeVenezia_0-1586412560545.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 06:09:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-change-the-font-attributes-of-the-gradlegend/m-p/638595#M19742</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2020-04-09T06:09:48Z</dc:date>
    </item>
  </channel>
</rss>

