<?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: Remove legend value outlines in SGPLOT bar charts in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139713#M5288</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In GTL, set the option DISPLAY=(FILL) for the bar chart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jul 2014 02:20:52 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2014-07-30T02:20:52Z</dc:date>
    <item>
      <title>Remove legend value outlines in SGPLOT bar charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139708#M5283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings from Australia.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I produced the following grouped bar chart using SGPLOT.&lt;/P&gt;&lt;P&gt;Not convinced its the best way to present such data but I just do as I'm told &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;IMG alt="vbar.PNG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/6906_vbar.PNG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;It needs some stylising which I can easily do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, where I work has very strict style requirements.&amp;nbsp; One being that if the bars in the chart have no outline, then the "bars" in the legend must also have no outline.&amp;nbsp; (and for coloured bars, no outline is the requirement).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SGPLOT code I used was&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 12pt; font-family: Courier New;"&gt;sgplot&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=fig_ageSpeo_rates &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 12pt; font-family: Courier New;"&gt;/*noautolegend*/&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;vbar&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; age_group/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;response&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=value &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;group&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=qty_sex groupdisplay=cluster &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;barwidth&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;nooutline&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;yaxis&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;min&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;5000&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;offsetmax&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 12pt; font-family: Courier New;"&gt;'Rate'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;xaxis&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;label&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 12pt; font-family: Courier New;"&gt;'Age'&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;keylegend&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;noborder&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;position&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=top &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;across&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 12pt; font-family: Courier New;"&gt;4&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; location=outside;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Does anyone know an easy way to get the legend 'squares' to not have an outline? (like you would get with SAS\Graph).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;I did something with GTL and LEGENDITEMS but that seems way too complicated for most of our users here to have to grapple with.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;All advice appreciated.&amp;nbsp; Am using SAS9.3 on a windows server.&amp;nbsp; I do also have access to SAS 9.4.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 23:06:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139708#M5283</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2014-07-28T23:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Remove legend value outlines in SGPLOT bar charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139709#M5284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can work around this behavior by making the outline color to be the same as the background instead of using NOOUTLINE. Try specifying OUTLINEATTRS=(color=white) and see if you get what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 00:20:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139709#M5284</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2014-07-29T00:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Remove legend value outlines in SGPLOT bar charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139710#M5285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That works nicely on 9.4.&amp;nbsp; outlineattrs seems to only be in 9.4 though?&amp;nbsp; Some of users are still on 9.3 (a long story).&lt;/P&gt;&lt;P&gt;I'm guessing there's no 9.3 workaround?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 22:49:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139710#M5285</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2014-07-29T22:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Remove legend value outlines in SGPLOT bar charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139711#M5286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are two ways.&amp;nbsp; &lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Derive a new style from the one you like and set the GraphOutlines contrastcolor to the same as the GraphWalls color.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; From SGPLOT, write out the GTL code using TMPLOUT='filename.sas'.&amp;nbsp; In the GTL code, in the BARCHARTPARM statement, set the OutlineAttrs=(color=GraphWalls:contrastcolor), just like you did in SG.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 23:54:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139711#M5286</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2014-07-29T23:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Remove legend value outlines in SGPLOT bar charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139712#M5287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the prompt reply late in your day Sanjay. Much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried option1 but it didn't seem to do anything.&amp;nbsp; Could you specify the exact syntax for me please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Option2 works but then with the white outline it now looks like there is a space between the grouped bars, which is not what we want.&lt;/P&gt;&lt;P&gt;Using the outlineattrs option Dan mentioned (in 9.4), did not introduce the 'space' issue though. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 02:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139712#M5287</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2014-07-30T02:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Remove legend value outlines in SGPLOT bar charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139713#M5288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In GTL, set the option DISPLAY=(FILL) for the bar chart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 02:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139713#M5288</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2014-07-30T02:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Remove legend value outlines in SGPLOT bar charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139714#M5289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We dug deeper to review what was happening.&amp;nbsp; Here is the scoop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With SAS 9.4, the legend color swatch outlines use the OutlineAttrs.&amp;nbsp; SGPLOT also supports OutlineAttrs option, so you can use the following code to get the results you want.&amp;nbsp; Swatches can be made bigger by setting AutoItemSize AND increasing the legend value font size. No change to a style is needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=sashelp.cars;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vbar origin / group=type response=mpg_city stat=mean groupdisplay=cluster &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;outlineattrs=(thickness=0 color=white);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; keylegend / autoitemsize valueattrs=(size=12);&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="outlines35.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/6910_outlines35.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;We discovered that at SAS 9.3, swatch outlines are determined internally.&amp;nbsp; A work around is possible for a special case that has only bar charts in the graph.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 15:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139714#M5289</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2014-07-30T15:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Remove legend value outlines in SGPLOT bar charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139715#M5290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks (again) for following up Sanjay.&lt;/P&gt;&lt;P&gt;Is the workaround for 9.3 the one you have already mentioned (in no.3 of this discussion) or something else?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If its the workaround in no.3&amp;nbsp;&amp;nbsp; are you able to provide the exact syntact for point 1 of that post?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 04:24:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139715#M5290</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2014-07-31T04:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Remove legend value outlines in SGPLOT bar charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139716#M5291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried (in SAS9.3) outlineattrs=(color=white thickness=0) in GTL but it still drew a white "outline" and hence there was a small gap between bars (and the legend squares looked a bit small).&amp;nbsp; I verified this by changing the color to red. The outline appeared.&amp;nbsp; It seems that (in 9.3) for the outlineattrs in GTL thickness of 0 is in fact the same as 1.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 05:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139716#M5291</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2014-07-31T05:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Remove legend value outlines in SGPLOT bar charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139717#M5292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The work around needed to overcome the built in logic is more complicated and will only work if you have a graph that has only a Bar Chart, without combining with other plot types.&amp;nbsp; It is kind of ugly, so I hesitate to even go there unless this is necessary, and it fits the above restriction.&amp;nbsp; Is removing the legend swatch outline really important?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 14:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Remove-legend-value-outlines-in-SGPLOT-bar-charts/m-p/139717#M5292</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2014-07-31T14:02:41Z</dc:date>
    </item>
  </channel>
</rss>

