<?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: PROC SGPANEL in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPANEL/m-p/555627#M18073</link>
    <description>&lt;P&gt;Here's some code that should do what you're asking (except I use a triangle instead of a star)...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let name=sgpanel;&lt;/P&gt;
&lt;P&gt;/*&lt;BR /&gt;Set your current-working-directory (to read/write files), if you need to ...&lt;BR /&gt;%let rc=%sysfunc(dlgcdir('c:\someplace\public_html'));&lt;BR /&gt;*/&lt;BR /&gt;filename odsout '.';&lt;/P&gt;
&lt;P&gt;ODS LISTING CLOSE;&lt;BR /&gt;ODS HTML path=odsout body="&amp;amp;name..htm" style=htmlblue;&lt;BR /&gt;ods graphics / imagemap tipmax=25000 imagefmt=png imagename="&amp;amp;name"&lt;BR /&gt;width=800px height=600px noborder;&lt;/P&gt;
&lt;P&gt;libname my_data 'u:\web\proj\pabster';&lt;BR /&gt;data analyse_all; set my_data.data;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;/* user-defined format for text that prints in legend */&lt;BR /&gt;proc format;&lt;BR /&gt;value $status&lt;BR /&gt;"0" = "Not Bankrupt"&lt;BR /&gt;"1" = "Bankrupt"&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;/* attribute map, for color &amp;amp; shape */&lt;BR /&gt;data myattrmap;&lt;BR /&gt;length id value markercolor markersymbol $20;&lt;BR /&gt;id='myid';&lt;BR /&gt;value='Not Bankrupt'; markersize=12; markercolor='green'; markersymbol='circle'; output;&lt;BR /&gt;value='Bankrupt'; markersize=12; markercolor='red'; markersymbol='triangle'; output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;title1 h=16pt "Banking Graph";&lt;BR /&gt;proc sgpanel data=analyse_all dattrmap=myattrmap;&lt;BR /&gt;format costat $status.;&lt;BR /&gt;panelby H / rows= 1;&lt;BR /&gt;scatter X= X5 Y= X1 / group=costat attrid=myid;&lt;BR /&gt;keylegend / position=bottom fillheight=11pt noborder&lt;BR /&gt;title="" valueattrs=(color=gray33 size=11pt weight=bold);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;quit;&lt;BR /&gt;ODS HTML CLOSE;&lt;BR /&gt;ODS LISTING;&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="banking_graph.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29165iC138EA64190A2376/image-size/large?v=v2&amp;amp;px=999" role="button" title="banking_graph.png" alt="banking_graph.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2019 14:55:46 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2019-05-02T14:55:46Z</dc:date>
    <item>
      <title>PROC SGPANEL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPANEL/m-p/555446#M18062</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;Im trying to create a scatter plot with Sgpanel but I can`t figure how to customize it with my Costat variable.&lt;BR /&gt;Costat variable basicaly tells me if the company is Bankrupt(=1) or Not (=0). I would like to see the Non banrupt companies in green and the shape being circles where as the Bankrupt companies would be red stars.&lt;BR /&gt;&lt;BR /&gt;Here is my actual code for now :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgpanel data= analyse_all;
panelby H / rows= 1;
scatter X= X5 Y= X1;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 18:58:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPANEL/m-p/555446#M18062</guid>
      <dc:creator>Pabster</dc:creator>
      <dc:date>2019-05-01T18:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPANEL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPANEL/m-p/555449#M18063</link>
      <description>&lt;P&gt;Try adding a GROUP = to your SCATTER statement to create different symbols. To customize the shapes you'll need to specify the attributes you want using the STYLEATTRS statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;GROUP= documentation reference&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n06qalr0ymoddkn17finxbpmv6e8.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p0pcknqci1w3w5n0z6ioxluu4daaf"&gt;https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetTarget=n06qalr0ymoddkn17finxbpmv6e8.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p0pcknqci1w3w5n0z6ioxluu4daaf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;STYLEATTRS reference (datasymbols and datacolor)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=p0qva1ws6twy5xn0zdl3nslyynvp.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=grstatproc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=p0qva1ws6twy5xn0zdl3nslyynvp.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/261982"&gt;@Pabster&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;Im trying to create a scatter plot with Sgpanel but I can`t figure how to customize it with my Costat variable.&lt;BR /&gt;Costat variable basicaly tells me if the company is Bankrupt(=1) or Not (=0). I would like to see the Non banrupt companies in green and the shape being circles where as the Bankrupt companies would be red stars.&lt;BR /&gt;&lt;BR /&gt;Here is my actual code for now :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgpanel data= analyse_all;
panelby H / rows= 1;
scatter X= X5 Y= X1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 19:03:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPANEL/m-p/555449#M18063</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-05-01T19:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPANEL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPANEL/m-p/555460#M18064</link>
      <description>In addition to GROUP option suggested by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;, you might want to consider using a discrete attributes map, since you want to assign specific attributes to specific group values. You will not need the STYLEATTRS statement in that case.&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;Dan</description>
      <pubDate>Wed, 01 May 2019 19:38:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPANEL/m-p/555460#M18064</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-05-01T19:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPANEL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPANEL/m-p/555627#M18073</link>
      <description>&lt;P&gt;Here's some code that should do what you're asking (except I use a triangle instead of a star)...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let name=sgpanel;&lt;/P&gt;
&lt;P&gt;/*&lt;BR /&gt;Set your current-working-directory (to read/write files), if you need to ...&lt;BR /&gt;%let rc=%sysfunc(dlgcdir('c:\someplace\public_html'));&lt;BR /&gt;*/&lt;BR /&gt;filename odsout '.';&lt;/P&gt;
&lt;P&gt;ODS LISTING CLOSE;&lt;BR /&gt;ODS HTML path=odsout body="&amp;amp;name..htm" style=htmlblue;&lt;BR /&gt;ods graphics / imagemap tipmax=25000 imagefmt=png imagename="&amp;amp;name"&lt;BR /&gt;width=800px height=600px noborder;&lt;/P&gt;
&lt;P&gt;libname my_data 'u:\web\proj\pabster';&lt;BR /&gt;data analyse_all; set my_data.data;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;/* user-defined format for text that prints in legend */&lt;BR /&gt;proc format;&lt;BR /&gt;value $status&lt;BR /&gt;"0" = "Not Bankrupt"&lt;BR /&gt;"1" = "Bankrupt"&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;/* attribute map, for color &amp;amp; shape */&lt;BR /&gt;data myattrmap;&lt;BR /&gt;length id value markercolor markersymbol $20;&lt;BR /&gt;id='myid';&lt;BR /&gt;value='Not Bankrupt'; markersize=12; markercolor='green'; markersymbol='circle'; output;&lt;BR /&gt;value='Bankrupt'; markersize=12; markercolor='red'; markersymbol='triangle'; output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;title1 h=16pt "Banking Graph";&lt;BR /&gt;proc sgpanel data=analyse_all dattrmap=myattrmap;&lt;BR /&gt;format costat $status.;&lt;BR /&gt;panelby H / rows= 1;&lt;BR /&gt;scatter X= X5 Y= X1 / group=costat attrid=myid;&lt;BR /&gt;keylegend / position=bottom fillheight=11pt noborder&lt;BR /&gt;title="" valueattrs=(color=gray33 size=11pt weight=bold);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;quit;&lt;BR /&gt;ODS HTML CLOSE;&lt;BR /&gt;ODS LISTING;&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="banking_graph.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29165iC138EA64190A2376/image-size/large?v=v2&amp;amp;px=999" role="button" title="banking_graph.png" alt="banking_graph.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 14:55:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPANEL/m-p/555627#M18073</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2019-05-02T14:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPANEL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPANEL/m-p/555730#M18076</link>
      <description>Thanks!!</description>
      <pubDate>Thu, 02 May 2019 19:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-SGPANEL/m-p/555730#M18076</guid>
      <dc:creator>Pabster</dc:creator>
      <dc:date>2019-05-02T19:17:48Z</dc:date>
    </item>
  </channel>
</rss>

