<?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 specifying a keylegend... in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/specifying-a-keylegend/m-p/480194#M16590</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Concordance_MAP;
input Measure $ DV:  $15.  IV:  $15. CC LCL UCL ;
datalines;
LA  BI_A_MAP BI_LA_MAP  0.5813 0.4376 0.696
LL  BI_A_MAP BI_LL_MAP  0.3992 0.1926 0.5719
Nex BI_A_MAP BI_Nex_MAP 0.6511 0.5149 0.7553
UA  BI_A_MAP BI_UA_MAP  0.5274 0.356  0.6644

LA  i3min_A_MAP  i3min_LA_MAP  0.5942 0.4548 0.7051
LL  i3min_A_MAP  i3min_LL_MAP  0.2979 0.0579 0.5054
Nex i3min_A_MAP  i3min_Nex_MAP 0.8376 0.764  0.8897
UA  i3min_A_MAP  i3min_UA_MAP  0.2369 0.049  0.4086
 
LA  i15min_A_MAP  i15min_LA_MAP  0.6234  0.4911 0.7275
LL  i15min_A_MAP  i15min_LL_MAP  0.5584  0.3475 0.7155
Nex i15min_A_MAP  i15min_Nex_MAP 0.6498  0.5169 0.7521
UA  i15min_A_MAP  i15min_UA_MAP  0.5681  0.4265 0.6825
   
LA  i30min_A_MAP i30min_LA_MAP  0.6298  0.4908  0.7376
LL  i30min_A_MAP i30min_LL_MAP  0.5181  0.3028  0.6831 
Nex i30min_A_MAP i30min_Nex_MAP 0.6895  0.5624  0.7848
UA  i30min_A_MAP i30min_UA_MAP  0.6076  0.4677  0.7178

LA  i45min_A_MAP i45min_LA_MAP  0.6877 0.5604 0.7832
LL  i45min_A_MAP i45min_LL_MAP  0.4402 0.2084 0.6252
Nex i45min_A_MAP i45min_Nex_MAP 0.7509 0.6422 0.83
UA  i45min_A_MAP i45min_UA_MAP  0.5898 0.4348 0.7108

LA  p3min_A_MAP p3min_LA_MAP  0.5436  0.3843 0.6714
LL  p3min_A_MAP p3min_LL_MAP  0.4575  0.2335 0.6353
Nex p3min_A_MAP p3min_Nex_MAP 0.6559  0.5297 0.7538
UA  p3min_A_MAP p3min_UA_MAP  0.424   0.2609 0.5636
;
run;






/*  ods listing style=listing; */
proc template;
   define style mystyle;
   parent=styles.sasweb;
      class graphwalls / 
            frameborder=off;
      class graphbackground / 
            color=white;
   end;
run;

ods listing close;
ods html style=mystyle path='.' file='newgraph.html';
ods graphics / reset=all border=off width=600 height=480;
   
   proc sgplot data=Concordance_MAP nowall noborder ;
      title 'Concordance coefficient by time';
      styleattrs datacontrastcolors=(CX016381 CX1BC9FF CXFF7F00 CX814101  ) ;
      scatter x=DV y=CC / group=IV yerrorlower=LCL yerrorupper=UCL noerrorcaps markerattrs=(symbol=circlefilled size =5 ) 
 groupdisplay=cluster clusterwidth =0.2;
 
 yaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal) ;
 xaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal);   
refline 0.75 / axis=y discretethickness=1 lineattrs=(color=cxd0e0f0)  LABEL = ('0.75');

   run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I tried entering a keylegend statement before the "run" line, specifying "Measure" as the categorical variable I wanted to be described in the kelegend using the colours :&amp;nbsp;CX016381 CX1BC9FF CXFF7F00 CX814101.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is not making a difference so don't know whet the error is. Without the keylegend statement &amp;nbsp;I just get a decryption for "IV"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I'm getting this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasNote"&gt;NOTE: Writing HTML Body file: newgraph.html&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Insufficient authorization to access /opt/sasinside/SASConfig/Lev1/SASApp/newgraph.html.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: No body file. HTML output will not be created.&lt;/DIV&gt;</description>
    <pubDate>Sat, 21 Jul 2018 22:29:19 GMT</pubDate>
    <dc:creator>ChristosK</dc:creator>
    <dc:date>2018-07-21T22:29:19Z</dc:date>
    <item>
      <title>specifying a keylegend...</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/specifying-a-keylegend/m-p/480194#M16590</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Concordance_MAP;
input Measure $ DV:  $15.  IV:  $15. CC LCL UCL ;
datalines;
LA  BI_A_MAP BI_LA_MAP  0.5813 0.4376 0.696
LL  BI_A_MAP BI_LL_MAP  0.3992 0.1926 0.5719
Nex BI_A_MAP BI_Nex_MAP 0.6511 0.5149 0.7553
UA  BI_A_MAP BI_UA_MAP  0.5274 0.356  0.6644

LA  i3min_A_MAP  i3min_LA_MAP  0.5942 0.4548 0.7051
LL  i3min_A_MAP  i3min_LL_MAP  0.2979 0.0579 0.5054
Nex i3min_A_MAP  i3min_Nex_MAP 0.8376 0.764  0.8897
UA  i3min_A_MAP  i3min_UA_MAP  0.2369 0.049  0.4086
 
LA  i15min_A_MAP  i15min_LA_MAP  0.6234  0.4911 0.7275
LL  i15min_A_MAP  i15min_LL_MAP  0.5584  0.3475 0.7155
Nex i15min_A_MAP  i15min_Nex_MAP 0.6498  0.5169 0.7521
UA  i15min_A_MAP  i15min_UA_MAP  0.5681  0.4265 0.6825
   
LA  i30min_A_MAP i30min_LA_MAP  0.6298  0.4908  0.7376
LL  i30min_A_MAP i30min_LL_MAP  0.5181  0.3028  0.6831 
Nex i30min_A_MAP i30min_Nex_MAP 0.6895  0.5624  0.7848
UA  i30min_A_MAP i30min_UA_MAP  0.6076  0.4677  0.7178

LA  i45min_A_MAP i45min_LA_MAP  0.6877 0.5604 0.7832
LL  i45min_A_MAP i45min_LL_MAP  0.4402 0.2084 0.6252
Nex i45min_A_MAP i45min_Nex_MAP 0.7509 0.6422 0.83
UA  i45min_A_MAP i45min_UA_MAP  0.5898 0.4348 0.7108

LA  p3min_A_MAP p3min_LA_MAP  0.5436  0.3843 0.6714
LL  p3min_A_MAP p3min_LL_MAP  0.4575  0.2335 0.6353
Nex p3min_A_MAP p3min_Nex_MAP 0.6559  0.5297 0.7538
UA  p3min_A_MAP p3min_UA_MAP  0.424   0.2609 0.5636
;
run;






/*  ods listing style=listing; */
proc template;
   define style mystyle;
   parent=styles.sasweb;
      class graphwalls / 
            frameborder=off;
      class graphbackground / 
            color=white;
   end;
run;

ods listing close;
ods html style=mystyle path='.' file='newgraph.html';
ods graphics / reset=all border=off width=600 height=480;
   
   proc sgplot data=Concordance_MAP nowall noborder ;
      title 'Concordance coefficient by time';
      styleattrs datacontrastcolors=(CX016381 CX1BC9FF CXFF7F00 CX814101  ) ;
      scatter x=DV y=CC / group=IV yerrorlower=LCL yerrorupper=UCL noerrorcaps markerattrs=(symbol=circlefilled size =5 ) 
 groupdisplay=cluster clusterwidth =0.2;
 
 yaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal) ;
 xaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal);   
refline 0.75 / axis=y discretethickness=1 lineattrs=(color=cxd0e0f0)  LABEL = ('0.75');

   run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I tried entering a keylegend statement before the "run" line, specifying "Measure" as the categorical variable I wanted to be described in the kelegend using the colours :&amp;nbsp;CX016381 CX1BC9FF CXFF7F00 CX814101.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is not making a difference so don't know whet the error is. Without the keylegend statement &amp;nbsp;I just get a decryption for "IV"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I'm getting this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasNote"&gt;NOTE: Writing HTML Body file: newgraph.html&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Insufficient authorization to access /opt/sasinside/SASConfig/Lev1/SASApp/newgraph.html.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: No body file. HTML output will not be created.&lt;/DIV&gt;</description>
      <pubDate>Sat, 21 Jul 2018 22:29:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/specifying-a-keylegend/m-p/480194#M16590</guid>
      <dc:creator>ChristosK</dc:creator>
      <dc:date>2018-07-21T22:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: specifying a keylegend...</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/specifying-a-keylegend/m-p/480197#M16591</link>
      <description>&lt;P&gt;Ok so I was able to get a keylegend by specifying "Measures" instead of "IV":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can't control the appearance or location of this keylegend with a keylegend statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   proc sgplot data=Concordance_MAP_lab nowall noborder ;

      title 'Concordance coefficient by time';
      styleattrs datacontrastcolors=(CX016381 CX1BC9FF CXFF7F00 CX814101  ) ;
      scatter x=DV y=CC / group=&lt;FONT color="#FF6600"&gt;Measure &lt;/FONT&gt;yerrorlower=LCL yerrorupper=UCL noerrorcaps markerattrs=(symbol=circlefilled size =5 ) 
 groupdisplay=cluster clusterwidth =0.2;
 
 yaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal) ;
 xaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal);   
refline 0.75 / axis=y discretethickness=1 lineattrs=(color=cxd0e0f0)  LABEL = ('0.75');
/*&lt;FONT color="#FF6600"&gt; keylegend "Measure"/location=outside;&lt;/FONT&gt;  */
   run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jul 2018 23:23:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/specifying-a-keylegend/m-p/480197#M16591</guid>
      <dc:creator>ChristosK</dc:creator>
      <dc:date>2018-07-21T23:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: specifying a keylegend...</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/specifying-a-keylegend/m-p/480199#M16592</link>
      <description>&lt;P&gt;Hello, Try adding a name="something" option to your scatter statement and then put that name reference into your keylegend. When you type something in the keylegend statement it has to match a reference from a NAME option in the graph statements.&amp;nbsp; When you specify a text that doesn't exist in a name reference then it doesn't have a legend to plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;e..g&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;scatter x=DV y=CC / group=Measure yerrorlower=LCL yerrorupper=UCL noerrorcaps markerattrs=(symbol=circlefilled size =5 ) 
 groupdisplay=cluster clusterwidth =0.2          Name="scatter";

keylegend "scatter" / ...;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Jul 2018 23:41:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/specifying-a-keylegend/m-p/480199#M16592</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2018-07-21T23:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: specifying a keylegend...</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/specifying-a-keylegend/m-p/480200#M16593</link>
      <description>&lt;P&gt;If I understand correctly, you are grouping by a variable you don't want in your legend but want the values of another variable.&amp;nbsp; Here's a quick trick to do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / reset=all border=off width=600 height=480;
   
   proc sgplot data=Concordance_MAP nowall noborder ;
      title 'Concordance coefficient by time';
      styleattrs datacontrastcolors=(CX016381 CX1BC9FF CXFF7F00 CX814101  ) ;
      scatter x=DV y=CC / group=IV yerrorlower=LCL yerrorupper=UCL noerrorcaps markerattrs=(symbol=circlefilled size =5 ) 
 groupdisplay=cluster clusterwidth =0.2;
        scatter x=dv y=cc / group=measure markerattrs=(size=0pt) name='scatter';
        
 keylegend 'scatter' / position=bottom location=outside autoitemsize title='Measures';
 
 yaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal) ;
 xaxis display =(noticks nolabel noline) VALUEATTRS=(Color=Black Family=Arial Size=8 Style=Normal Weight=Normal);   
refline 0.75 / axis=y discretethickness=1 lineattrs=(color=cxd0e0f0)  LABEL = ('0.75');

   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I add a scatter plot to your graph that groups by measure, I name it "scatter," and I enter only that scatter plot into the keylegend.&amp;nbsp; It keeps the values of measure that you can then show in the legend.&amp;nbsp; The new scatter plot has a size of 0pt so it won't show up in the graph.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jul 2018 23:56:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/specifying-a-keylegend/m-p/480200#M16593</guid>
      <dc:creator>JeffMeyers</dc:creator>
      <dc:date>2018-07-21T23:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: specifying a keylegend...</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/specifying-a-keylegend/m-p/480202#M16594</link>
      <description>&lt;P&gt;Thank you Jeff!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Worked perfectly and I was able to position it where I needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Christos&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jul 2018 00:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/specifying-a-keylegend/m-p/480202#M16594</guid>
      <dc:creator>ChristosK</dc:creator>
      <dc:date>2018-07-22T00:59:02Z</dc:date>
    </item>
  </channel>
</rss>

