<?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: INCLUDE ALL LEGEND ENTRY in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177242#M6510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Only seeing this now. Dan's hints should help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Nov 2014 22:13:00 GMT</pubDate>
    <dc:creator>djrisks</dc:creator>
    <dc:date>2014-11-19T22:13:00Z</dc:date>
    <item>
      <title>INCLUDE ALL LEGEND ENTRY</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177236#M6504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question.&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;How can I include all the &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;legend entries in graph even though&amp;nbsp; the legend group not include in the graph?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an example I took coding from SAS website:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 10pt; line-height: 1.5em; background-color: transparent;"&gt;You can apply a format to a group column to change the legend entry labels or the number of classification levels. The ordering of the legend entries is based on the order of the pre-formatted group values. In the following example, the data is sorted in ascending order, so the legend entry order is "Pre-Teen" "Teen" "Adult." Because there are no adults, "Adult" does not appear in the graph. &lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="paragraph" style="margin-top: 1.4em;"&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333; background: gainsboro;"&gt;proc format;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;&amp;nbsp; &lt;SPAN style="background: gainsboro;"&gt;value teenfmt&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;&amp;nbsp; &lt;SPAN style="background: gainsboro;"&gt;low-12&amp;nbsp; = "Pre-Teen"&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;&amp;nbsp; &lt;SPAN style="background: gainsboro;"&gt;13-19&amp;nbsp;&amp;nbsp; = "Teen"&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;&amp;nbsp; &lt;SPAN style="background: gainsboro;"&gt;20-high = "Adult";&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333; background: gainsboro;"&gt;run;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;proc sort data=sashelp.class out=class;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;&amp;nbsp; by age;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt; &lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;proc sgrender data=class template=order;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;&amp;nbsp; format age teenfmt.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;&amp;nbsp; dynamic&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; title="Formatted Order of Legend Entries";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 8.5pt; font-family: 'Courier New'; color: #333333;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 07:08:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177236#M6504</guid>
      <dc:creator>N_H_A_R</dc:creator>
      <dc:date>2014-11-19T07:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE ALL LEGEND ENTRY</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177237#M6505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, you should be able to achieve what you want by using Discrete Attribute Maps. What version of SAS have you got, and can you send me the GTL code for the "Order" template that you have created?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 10:02:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177237#M6505</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2014-11-19T10:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE ALL LEGEND ENTRY</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177238#M6506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS link that I refer: &lt;A href="http://support.sas.com/documentation/cdl/en/grstatug/62464/HTML/default/viewer.htm#n0778d2wh7kybzn1phdmwh5cwg53.htm" title="http://support.sas.com/documentation/cdl/en/grstatug/62464/HTML/default/viewer.htm#n0778d2wh7kybzn1phdmwh5cwg53.htm"&gt;SAS/GRAPH(R) 9.2: Graph Template Language User's Guide, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used SAS 9.4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my real coding: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* example 2;&lt;/P&gt;&lt;P&gt;* select an empty pattern (v=e) and a title;&lt;/P&gt;&lt;P&gt;pattern v=e;&lt;/P&gt;&lt;P&gt;title 'EXAMPLE #2 ';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gmap&lt;/P&gt;&lt;P&gt;map=maps.malaysia&lt;/P&gt;&lt;P&gt;data=maps.malaysia (obs=1)&lt;/P&gt;&lt;P&gt;all;&lt;/P&gt;&lt;P&gt;id id;&lt;/P&gt;&lt;P&gt;choro id / nolegend;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value API_&lt;/P&gt;&lt;P&gt;0 - 50 = '0 - 50'&lt;/P&gt;&lt;P&gt;51 - 100 = '51 - 100'&lt;/P&gt;&lt;P&gt;101 - 200 = '101 - 200'&lt;/P&gt;&lt;P&gt;201 - 300 = '201 - 300'&lt;/P&gt;&lt;P&gt;301 - high = '301 &amp;gt;'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data malaysia;&lt;/P&gt;&lt;P&gt;input id API @@;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 38 &lt;/P&gt;&lt;P&gt;2 49&lt;/P&gt;&lt;P&gt;3 41&lt;/P&gt;&lt;P&gt;4 38&lt;/P&gt;&lt;P&gt;5 43&lt;/P&gt;&lt;P&gt;6 49&lt;/P&gt;&lt;P&gt;7 26&lt;/P&gt;&lt;P&gt;8 29&lt;/P&gt;&lt;P&gt;9 46&lt;/P&gt;&lt;P&gt;10 64&lt;/P&gt;&lt;P&gt;11 32&lt;/P&gt;&lt;P&gt;12 47&lt;/P&gt;&lt;P&gt;13 45&lt;/P&gt;&lt;P&gt;14 44&lt;/P&gt;&lt;P&gt;15 39&lt;/P&gt;&lt;P&gt;16 34&lt;/P&gt;&lt;P&gt;17 47&lt;/P&gt;&lt;P&gt;18 55&lt;/P&gt;&lt;P&gt;19 43&lt;/P&gt;&lt;P&gt;20 55&lt;/P&gt;&lt;P&gt;21 32&lt;/P&gt;&lt;P&gt;22 54&lt;/P&gt;&lt;P&gt;23 53&lt;/P&gt;&lt;P&gt;24 48&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;* fill patterns for the map areas ;&lt;/P&gt;&lt;P&gt;pattern1 v=s c=green;&lt;/P&gt;&lt;P&gt;pattern2 v=s c=yellow;&lt;/P&gt;&lt;P&gt;pattern3 v=s c=orange;&lt;/P&gt;&lt;P&gt;pattern4 v=s c=maroon;&lt;/P&gt;&lt;P&gt;pattern5 v=s c=red;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gmap&lt;/P&gt;&lt;P&gt;data=malaysia&lt;/P&gt;&lt;P&gt;map=maps.malaysia;&lt;/P&gt;&lt;P&gt;id id;&lt;/P&gt;&lt;P&gt;choro API / discrete;&lt;/P&gt;&lt;P&gt;format API API_.;&lt;/P&gt;&lt;P&gt;title ' January 2005';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the other problem is, how can I fix the color pattern&amp;nbsp; belong to the specific scale? I mean&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0 - 50 = '0 - 50' I want this in green&lt;/P&gt;&lt;P&gt;51 - 100 = '51 - 100'&amp;nbsp; I want this in yellow&lt;/P&gt;&lt;P&gt;101 - 200 = '101 - 200' Orange&lt;/P&gt;&lt;P&gt;201 - 300 = '201 - 300' Maroon&lt;/P&gt;&lt;P&gt;301 - high = '301 &amp;gt;' Red&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 12:39:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177238#M6506</guid>
      <dc:creator>N_H_A_R</dc:creator>
      <dc:date>2014-11-19T12:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE ALL LEGEND ENTRY</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177239#M6507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROC GMAP is a SAS/Graph proc, and not part of GTL or the SG procedures. Therefore, the discrete attribute map approach will not work. I did discuss this situation with a colleague that had a interesting way to make it happen. Use ID=0 and create observations that contain one value from each range. That way, the observation has no impact on the map, but the legend will show all ranges. For your example, you will need 5 additional observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 19:52:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177239#M6507</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2014-11-19T19:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE ALL LEGEND ENTRY</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177240#M6508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One word of caution when adding 'fake' observations to the data ... the "best practice" is probably to create a separate dataset just for the graph, and then throw it away, rather than adding the fake observations to the real dataset. If you add the observations to the real dataset, and later do any graphs or calculations that perform a frequency count, the fake observations could cause the frequency values to be wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 19:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177240#M6508</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2014-11-19T19:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE ALL LEGEND ENTRY</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177241#M6509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another approach would be to make an Annotate data set for the legend information and suppress the actual legend. This has some additional flexibility at the typical expense of somewhat more work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 20:26:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177241#M6509</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-11-19T20:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: INCLUDE ALL LEGEND ENTRY</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177242#M6510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Only seeing this now. Dan's hints should help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 22:13:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/INCLUDE-ALL-LEGEND-ENTRY/m-p/177242#M6510</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2014-11-19T22:13:00Z</dc:date>
    </item>
  </channel>
</rss>

