<?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: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464133#M15984</link>
    <description>&lt;P&gt;The annotate facility will let you create a lot of stuff but that would be automatic. You have to provide location coordinates, for line segments start and end, color, line type, symbol and color as well as you having to provide coordinates that do not overlap other graph elements.&lt;/P&gt;
&lt;P&gt;So create the legend for the SCATTER plot ant then create an annotate data set to add the line. There are a number of macros to help. Look at %SGLINE documentation to build a short line segment.&lt;/P&gt;</description>
    <pubDate>Tue, 22 May 2018 17:43:39 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-05-22T17:43:39Z</dc:date>
    <item>
      <title>How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/463726#M15974</link>
      <description>&lt;P&gt;Hi, there:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to change "Squarefilled" marker to "Square with horizontal bar" in the code &amp;amp; the picture below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
    input x y lower upper @@;
    datalines;
    1 10 8 11 2 11 10 14 3 13 10 14
    4 13 11 15 5 14 12 16
    ;
run;
proc sgplot data=test;
    scatter x=x y=y / yerrorlower=lower yerrorupper=upper 
                      markerattrs=(symbol=squarefilled) errorbarattrs=(color=blue pattern=solid);
    keylegend / noborder;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="problem.JPG" style="width: 155px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20646i4E6C5D6BAA35AEDA/image-size/large?v=v2&amp;amp;px=999" role="button" title="problem.JPG" alt="problem.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want to change this like the following picture.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="wanted.JPG" style="width: 210px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20645iA073D0CEB88F0AA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="wanted.JPG" alt="wanted.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To use LEGENDITEM Statement in SGPLOT seems to be an answer for my question, but this statement applies to SAS9.4M5 and to later releases. And my SAS is 9.4M3.&lt;/P&gt;&lt;P&gt;Please help me. Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 07:26:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/463726#M15974</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-21T07:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/463730#M15975</link>
      <description>&lt;P&gt;Square filled marker with a line makes sense if you have a series plot with markers.&amp;nbsp; if you use SERIES plot with MARKERS, you should get a merged legend showing the marker with a line automatically.&amp;nbsp; I don't think you can get that if you only use the SCATTER statement.&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 08:18:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/463730#M15975</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-05-21T08:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/463749#M15977</link>
      <description>&lt;P&gt;Hi, Mr. Sanjay:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;Like you said, I used SERIES statement with MARKERS option, and I got the result below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
    input x y lower upper @@;
    datalines;
    1 10 8 11 2 11 10 14 3 13 10 14
    4 13 11 15 5 14 12 16
    ;
run;
proc sgplot data=test;
    series x=x y=y / name="series" markers markerattrs=(symbol=squarefilled color=blue) lineattrs=(color=blue pattern=solid);
    scatter x=x y=y / name="scatter" yerrorlower=lower yerrorupper=upper 
                      markerattrs=(symbol=squarefilled) errorbarattrs=(color=blue pattern=solid);
    keylegend "series" / noborder;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="output.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20649iA5EBB0B688332049/image-size/medium?v=v2&amp;amp;px=400" role="button" title="output.JPG" alt="output.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I don't need lines that connect plots, but I can't find options to extinguish them.&lt;/P&gt;&lt;P&gt;Are there any option, etc. to delete them?&lt;/P&gt;&lt;P&gt;Thank you for your kind cooperation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 10:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/463749#M15977</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-21T10:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/463781#M15978</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/204979"&gt;@KentaMURANAKA&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, Mr. Sanjay:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your response.&lt;/P&gt;
&lt;P&gt;Like you said, I used SERIES statement with MARKERS option, and I got the result below.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
    input x y lower upper @@;
    datalines;
    1 10 8 11 2 11 10 14 3 13 10 14
    4 13 11 15 5 14 12 16
    ;
run;
proc sgplot data=test;
    series x=x y=y / name="series" markers markerattrs=(symbol=squarefilled color=blue) lineattrs=(color=blue pattern=solid);
    scatter x=x y=y / name="scatter" yerrorlower=lower yerrorupper=upper 
                      markerattrs=(symbol=squarefilled) errorbarattrs=(color=blue pattern=solid);
    keylegend "series" / noborder;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="output.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20649iA5EBB0B688332049/image-size/medium?v=v2&amp;amp;px=400" role="button" title="output.JPG" alt="output.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I don't need lines that connect plots, but I can't find options to extinguish them.&lt;/P&gt;
&lt;P&gt;Are there any option, etc. to delete them?&lt;/P&gt;
&lt;P&gt;Thank you for your kind cooperation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You requested a legend with a bar through the symbol. If there is no line through the symbol then having the legend appear that way implies something not displayed, i.e. the line through the symbol, is missing in the actual plot. I think that you need to&amp;nbsp;&amp;nbsp;decide which is more important, the legend appearance or the legend actually matching the graph.&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 14:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/463781#M15978</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-21T14:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/463929#M15979</link>
      <description>&lt;P&gt;Hi, ballarbw:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;Of course, I understand what you said, and I think whichever is good, "marker with bar" or "only marker".&lt;/P&gt;&lt;P&gt;But now I'm trying to re-analyze specific data, and previous result is expressed in the way I questioned.&lt;/P&gt;&lt;P&gt;Are there no options? I'm sorry, but please help me.&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2018 23:20:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/463929#M15979</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-21T23:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464133#M15984</link>
      <description>&lt;P&gt;The annotate facility will let you create a lot of stuff but that would be automatic. You have to provide location coordinates, for line segments start and end, color, line type, symbol and color as well as you having to provide coordinates that do not overlap other graph elements.&lt;/P&gt;
&lt;P&gt;So create the legend for the SCATTER plot ant then create an annotate data set to add the line. There are a number of macros to help. Look at %SGLINE documentation to build a short line segment.&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 17:43:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464133#M15984</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-22T17:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464137#M15985</link>
      <description>&lt;P&gt;You can get a combined marker and line in the legend if you use SERIES with the MARKER option.&amp;nbsp; You can set the line thickness=0.&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 17:56:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464137#M15985</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-05-22T17:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464254#M15994</link>
      <description>&lt;P&gt;Hi, ballardw:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for response.&lt;/P&gt;&lt;P&gt;Annotate Function......It feels like difficult for me now.&lt;/P&gt;&lt;P&gt;Mmm&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 01:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464254#M15994</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-23T01:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464256#M15995</link>
      <description>&lt;P&gt;Hi, Mr. Sanjay:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;Like you said, I used THICKNESS=0 and got the following result.&lt;/P&gt;&lt;P&gt;But also in Legend, I want marker&amp;amp;line. Are there any options, which delete line only in graph, not legend?&lt;/P&gt;&lt;P&gt;I can't find, sorry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me add more information.&lt;/P&gt;&lt;P&gt;I'm trying to re-analyze data (Who conducted the first analysis, I don't know).&lt;/P&gt;&lt;P&gt;They probably analyze using SAS, so I believe we can accomplish one I questioned.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
    input x y lower upper @@;
    datalines;
    1 10 8 11 2 11 10 14 3 13 10 14
    4 13 11 15 5 14 12 16
    ;
run;
proc sgplot data=test;
    series x=x y=y / name="series" markers markerattrs=(symbol=squarefilled color=blue)
                     lineattrs=(color=blue pattern=solid thickness=0);
    scatter x=x y=y / name="scatter" yerrorlower=lower yerrorupper=upper 
                      markerattrs=(symbol=squarefilled) errorbarattrs=(color=blue pattern=solid);
    keylegend "series" / noborder;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 01:12:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464256#M15995</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-23T01:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464265#M15996</link>
      <description>&lt;P&gt;Add a legenditem statement, and then update the keylegend statement to only show the legenditem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
	input x y lower upper @@;
	datalines;
    1 10 8 11 2 11 10 14 3 13 10 14
    4 13 11 15 5 14 12 16
    ;
run;

proc sgplot data=test;
	series x=x y=y / name="series" markers markerattrs=(symbol=squarefilled 
		color=blue) lineattrs=(color=blue pattern=solid thickness=0);
	scatter x=x y=y / name="scatter" yerrorlower=lower yerrorupper=upper 
		markerattrs=(symbol=squarefilled) errorbarattrs=(color=blue pattern=solid);
    legenditem type=markerline name="seriestype" /
      markerattrs=(symbol=squarefilled color=blue)
      lineattrs=(color=blue pattern=solid thickness=1)
      label='y';  
	keylegend "seriestype" / noborder;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;EDITED TO ADD:&amp;nbsp; Legenditem statement is new in SAS 9.4M5, so won't work if you are using SAS 9.4M3.&amp;nbsp; Sorry!&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 02:44:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464265#M15996</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2018-05-23T02:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464268#M15997</link>
      <description>&lt;P&gt;This version uses annotation.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
	input x y lower upper @@;
	datalines;
    1 10 8 11 2 11 10 14 3 13 10 14
    4 13 11 15 5 14 12 16
    ;
run;

%sganno;

data anno;
  %sgline(x1=2.8,
          y1=6.43,
          x2=3.05,
          y2=6.43,
          drawspace='datavalue',
          linethickness=1);
run;

proc sgplot data=test sganno=anno;
	series x=x y=y / name="series" markers markerattrs=(symbol=squarefilled 
		color=blue) lineattrs=(color=blue pattern=solid thickness=0);
	scatter x=x y=y / name="scatter" yerrorlower=lower yerrorupper=upper 
		markerattrs=(symbol=squarefilled) errorbarattrs=(color=blue pattern=solid);
	keylegend "series" / noborder;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 May 2018 02:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464268#M15997</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2018-05-23T02:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Symbol's Attribute of Legend in SGPLOT (SAS9.4M3)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464270#M15998</link>
      <description>&lt;P&gt;Hi, Ms. Suzanne, All:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;Thanks to your code, I accomplished my objective.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot, All.&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 03:21:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Symbol-s-Attribute-of-Legend-in-SGPLOT-SAS9-4M3/m-p/464270#M15998</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-23T03:21:53Z</dc:date>
    </item>
  </channel>
</rss>

