<?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: Placing graph marker symbols in a custom legend in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Placing-graph-marker-symbols-in-a-custom-legend/m-p/567683#M18354</link>
    <description>&lt;P&gt;Dan, thanks for this suggestion, it worked really well.&amp;nbsp; I was constructing my plot with the GTL so I used the LEGENDITEM statement with the DISCRETELEGEND statement rather than LEGENDITEM/KEYLEGEND as in Sanjay's blog post.&amp;nbsp; It allowed the ability to place markers and text even with a default legend suppressed.&amp;nbsp; And even with the lattice layout, I was able to place it exactly where I wanted, it works with UNICODE text, get an opaque background, a box around it...everything the client wanted!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I browsed Sanjay's posts but also found&amp;nbsp;a short, simple example in the&amp;nbsp;&lt;SPAN&gt;SAS® 9.4 Graph Template Language: Reference, Fifth Edition, LEGENDITEM statement:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=p0ltl3z1z97jldn14vccmjnrhg2n.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p0fbudelp8ptnan1q4bqonlwzn0o"&gt;https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=p0ltl3z1z97jldn14vccmjnrhg2n.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p0fbudelp8ptnan1q4bqonlwzn0o&lt;/A&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>Thu, 20 Jun 2019 16:14:29 GMT</pubDate>
    <dc:creator>cdorger</dc:creator>
    <dc:date>2019-06-20T16:14:29Z</dc:date>
    <item>
      <title>Placing graph marker symbols in a custom legend</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Placing-graph-marker-symbols-in-a-custom-legend/m-p/567000#M18329</link>
      <description>&lt;P&gt;Is there a way to place a marker symbol on&amp;nbsp; a graph using the Graph Template language analogous to the SAS/Graph annotate facility function="SYMBOL"?&amp;nbsp; I want to make a custom legend for a plot and I am using a LAYOUT GRIDDED to place two rows: "&amp;lt;65 Years" and "&amp;gt;=65 Years".&amp;nbsp; I want to place the markers used on the graph before this text.&amp;nbsp; I know you can use DRAWOVAL and BEGINPOLYGON to create shapes but this is complicated and does not look exactly like the marker symbols.&amp;nbsp; Is there a font that would give me access to the markers I use in the plot so that I can place them as a single character?&amp;nbsp; I am using version 9.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works but is awkward and the triangle does not look exactly like the filledtriangle plot marker:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Draw the symbol/text for the first line of the legend;
drawoval x=89 y=90 width=5 height=5 /xspace=graphpercent yspace=graphpercent anchor=left widthunit=pixel 
									 heightunit=pixel display=(fill) fillattrs=(color=darkblue) transparency=0;
drawtext "&amp;lt;65 Years" / xspace=graphpercent yspace=graphpercent anchor=left width=15 widthunit=percent x=90 y=90;
*Draw the symbol/text for the second line of the legend;
beginpolygon  x=&amp;amp;x0  y=&amp;amp;y0 / xspace=graphpercent yspace=graphpercent transparency=0 display=(fill) fillattrs=(color=darkred);
		draw  x=&amp;amp;x1  y=&amp;amp;y0;
		draw  x=&amp;amp;x2  y=&amp;amp;y1;
endpolygon;
drawtext {unicode "2265"x} "65 Years" / xspace=graphpercent yspace=graphpercent anchor=left width=15 widthunit=percent x=90 y=87;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jun 2019 18:41:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Placing-graph-marker-symbols-in-a-custom-legend/m-p/567000#M18329</guid>
      <dc:creator>cdorger</dc:creator>
      <dc:date>2019-06-18T18:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Placing graph marker symbols in a custom legend</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Placing-graph-marker-symbols-in-a-custom-legend/m-p/567280#M18330</link>
      <description>&lt;P&gt;Instead of using annotation, try using the LEGENDITEM functionality instead. Here is a blog post from Sanjay on how it can be used:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/10/27/legend-items/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2017/10/27/legend-items/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;BR /&gt;Dan&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:55:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Placing-graph-marker-symbols-in-a-custom-legend/m-p/567280#M18330</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-06-19T13:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Placing graph marker symbols in a custom legend</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Placing-graph-marker-symbols-in-a-custom-legend/m-p/567683#M18354</link>
      <description>&lt;P&gt;Dan, thanks for this suggestion, it worked really well.&amp;nbsp; I was constructing my plot with the GTL so I used the LEGENDITEM statement with the DISCRETELEGEND statement rather than LEGENDITEM/KEYLEGEND as in Sanjay's blog post.&amp;nbsp; It allowed the ability to place markers and text even with a default legend suppressed.&amp;nbsp; And even with the lattice layout, I was able to place it exactly where I wanted, it works with UNICODE text, get an opaque background, a box around it...everything the client wanted!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I browsed Sanjay's posts but also found&amp;nbsp;a short, simple example in the&amp;nbsp;&lt;SPAN&gt;SAS® 9.4 Graph Template Language: Reference, Fifth Edition, LEGENDITEM statement:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=p0ltl3z1z97jldn14vccmjnrhg2n.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p0fbudelp8ptnan1q4bqonlwzn0o"&gt;https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=p0ltl3z1z97jldn14vccmjnrhg2n.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p0fbudelp8ptnan1q4bqonlwzn0o&lt;/A&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>Thu, 20 Jun 2019 16:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Placing-graph-marker-symbols-in-a-custom-legend/m-p/567683#M18354</guid>
      <dc:creator>cdorger</dc:creator>
      <dc:date>2019-06-20T16:14:29Z</dc:date>
    </item>
  </channel>
</rss>

