<?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: SAS Graphs in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/869420#M23665</link>
    <description>I tried this but it didn’t worked for me. Any other solution?</description>
    <pubDate>Wed, 12 Apr 2023 15:17:43 GMT</pubDate>
    <dc:creator>v307086</dc:creator>
    <dc:date>2023-04-12T15:17:43Z</dc:date>
    <item>
      <title>SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868943#M23644</link>
      <description>&lt;P&gt;Hello, I am using globallegend to represent my legends but unfortunately, the legend is coming outside the &lt;SPAN&gt;plot area&lt;/SPAN&gt;. Is there any way to get the legend inside the graph? here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc template;&lt;BR /&gt;define statgraph globallegend;&lt;BR /&gt;begingraph;&lt;BR /&gt;entrytitle "Prediction Ellipses";&lt;BR /&gt;layout overlay;&lt;BR /&gt;scatterplot x=petallength y=petalwidth / group=species&lt;BR /&gt;name="sp";&lt;BR /&gt;ellipse x=petallength y=petalwidth / type=predicted alpha=0.2&lt;BR /&gt;name="p80" legendlabel="80%" outlineattrs=graphconfidence;&lt;BR /&gt;ellipse x=petallength y=petalwidth / type=predicted alpha=0.05&lt;BR /&gt;name="p95" legendlabel="95%" outlineattrs=graphconfidence2;&lt;BR /&gt;endlayout;&lt;BR /&gt;layout globalLegend / type=column title="Sample Global Legend";&lt;BR /&gt;discretelegend "sp" / title="Species:";&lt;BR /&gt;discretelegend "p80" "p95" / title="Predictions:";&lt;BR /&gt;endLayout;&lt;BR /&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;proc sgrender data=sashelp.iris template=globallegend;&lt;BR /&gt;run;&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="Capture.PNG" style="width: 519px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82450iB4F10661294ED0A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help!!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 21:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868943#M23644</guid>
      <dc:creator>v307086</dc:creator>
      <dc:date>2023-04-10T21:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868949#M23645</link>
      <description>Have you tried the LOCATION=INSIDE option statement in the DISCRETELEGEND statement?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/grstatgraph/p0nebkqa1obtgxn13ska62up7wwh.htm#n18ugxvre36a5vn1uqt5zkrumlkwb" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/grstatgraph/p0nebkqa1obtgxn13ska62up7wwh.htm#n18ugxvre36a5vn1uqt5zkrumlkwb&lt;/A&gt;</description>
      <pubDate>Mon, 10 Apr 2023 21:01:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868949#M23645</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2023-04-10T21:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868951#M23647</link>
      <description>Yes, I have tried it, but no luck</description>
      <pubDate>Mon, 10 Apr 2023 21:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868951#M23647</guid>
      <dc:creator>v307086</dc:creator>
      <dc:date>2023-04-10T21:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868954#M23648</link>
      <description>&lt;P&gt;LAYOUT GLOBALLEGEND is outside of all other layouts by design. You can put both of your DISCRETELEGENDS inside of the LAYOUT OVERLAY and use the AUTOALIGN feature to have the legends position themselves in a way to prevent data collision (if possible). Would that work for you?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 21:28:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868954#M23648</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-04-10T21:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868956#M23649</link>
      <description>Hello DanH_sas,&lt;BR /&gt;I tried this as well, but it didn't work. Any other suggestion</description>
      <pubDate>Mon, 10 Apr 2023 21:51:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868956#M23649</guid>
      <dc:creator>v307086</dc:creator>
      <dc:date>2023-04-10T21:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868964#M23650</link>
      <description>&lt;P&gt;Did your layout overlay look like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;layout overlay;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; scatterplot x=petallength y=petalwidth / group=species&lt;/SPAN&gt;&lt;SPAN&gt;name="sp";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ellipse x=petallength y=petalwidth / type=predicted alpha=0.2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name="p80" legendlabel="80%" outlineattrs=graphconfidence;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ellipse x=petallength y=petalwidth / type=predicted alpha=0.05&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name="p95" legendlabel="95%" outlineattrs=graphconfidence2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; discretelegend "sp" / title="Species:" location=inside autoalign=(topleft topright bottomleft bottomright);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; discretelegend "p80" "p95" / title="Predictions:" location=inside autoalign=(topleft topright bottomleft bottomright);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;endlayout;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The LAYOUT GLOBALLEGEND block should be removed.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 23:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868964#M23650</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-04-10T23:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868967#M23651</link>
      <description>Yeah I did the same, and removed layout globallengend block</description>
      <pubDate>Mon, 10 Apr 2023 23:30:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868967#M23651</guid>
      <dc:creator>v307086</dc:creator>
      <dc:date>2023-04-10T23:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868983#M23652</link>
      <description>&lt;P&gt;I get the picture below with the code I gave you. Is there a particular way you want the legends arranged?&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="iris.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82461i530F307D34841E45/image-size/large?v=v2&amp;amp;px=999" role="button" title="iris.png" alt="iris.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 04:24:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868983#M23652</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-04-11T04:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868990#M23653</link>
      <description>I want my legends to align vertically.&lt;BR /&gt;Like this:&lt;BR /&gt;Species&lt;BR /&gt;symbol Setosa&lt;BR /&gt;symbol Versicolor&lt;BR /&gt;symbol Viginica&lt;BR /&gt;&lt;BR /&gt;Predictions&lt;BR /&gt;symbol 80%&lt;BR /&gt;symbol 95%&lt;BR /&gt;&lt;BR /&gt;Along with the vertical alignment, i want them to be placed on the right side of the plot.</description>
      <pubDate>Tue, 11 Apr 2023 05:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/868990#M23653</guid>
      <dc:creator>v307086</dc:creator>
      <dc:date>2023-04-11T05:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/869008#M23654</link>
      <description>&lt;P&gt;To do this, you need to use a LAYOUT GRIDDED inside of the LAYOUT OVERLAY:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph globallegend;
begingraph;
entrytitle "Prediction Ellipses";
layout overlay;
scatterplot x=petallength y=petalwidth / group=species
name="sp";
ellipse x=petallength y=petalwidth / type=predicted alpha=0.2
name="p80" legendlabel="80%" outlineattrs=graphconfidence;
ellipse x=petallength y=petalwidth / type=predicted alpha=0.05
name="p95" legendlabel="95%" outlineattrs=graphconfidence2;
layout gridded / border=true autoalign=(topleft topright bottomleft bottomright);
entry halign=left "Sample Global Legend" / textattrs=GraphLabelText;
entry halign=left "Species:" / textattrs=GraphLabelText;
discretelegend "sp" / border=false halign=left;
entry halign=left "Predictions:" / textattrs=GraphLabelText;
discretelegend "p80" "p95" / border=false halign=left;
endlayout;
endlayout;
endgraph;
end;
run;
proc sgrender data=sashelp.iris template=globallegend;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iris2.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82469i06C3756FBB320E44/image-size/large?v=v2&amp;amp;px=999" role="button" title="iris2.png" alt="iris2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 06:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/869008#M23654</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-04-11T06:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/869236#M23663</link>
      <description>Thanks DanH_sas, it worked!!&lt;BR /&gt;Just a quick question what option do I need to use if I want a space between viriginica and predications. like i want to show that there are two different titles. A space will work i think. Any leads?</description>
      <pubDate>Tue, 11 Apr 2023 23:58:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/869236#M23663</guid>
      <dc:creator>v307086</dc:creator>
      <dc:date>2023-04-11T23:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/869408#M23664</link>
      <description>&lt;P&gt;Before the "Predictions:" entry, just add a " " entry:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;entry halign=left " ";
entry halign=left "Predictions:" / textattrs=GraphLabelText;
&lt;/LI-CODE&gt;
&lt;P&gt;You can do the same thing before "Species:" if you want a gap between the legend and the global title.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 13:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/869408#M23664</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-04-12T13:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/869420#M23665</link>
      <description>I tried this but it didn’t worked for me. Any other solution?</description>
      <pubDate>Wed, 12 Apr 2023 15:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/869420#M23665</guid>
      <dc:creator>v307086</dc:creator>
      <dc:date>2023-04-12T15:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Graphs</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/869421#M23666</link>
      <description>&lt;P&gt;"Didn't work" is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the "&amp;lt;/&amp;gt;" to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the "&amp;lt;/&amp;gt;" icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In other words, Show the code you actually used and best from the log as the messages SAS provides often will indicate what is needed.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2023 15:22:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-Graphs/m-p/869421#M23666</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-04-12T15:22:09Z</dc:date>
    </item>
  </channel>
</rss>

