<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500</link>
    <title>MATLAB Central Newsreader - Changing Legend transparency</title>
    <description>Feed for thread: Changing Legend transparency</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 23 Nov 2006 05:20:47 -0500</pubDate>
      <title>Changing Legend transparency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500#343901</link>
      <author>Randy Yates</author>
      <description>When I first add a legend, it has a black border and&lt;br&gt;
it is non-transparent. If I execute &quot;legend boxoff&quot;,&lt;br&gt;
the black border goes away AND the legend becomes&lt;br&gt;
transparent. How do I turn off the border and keep&lt;br&gt;
the legend non-transparent?&lt;br&gt;
-- &lt;br&gt;
%  Randy Yates                  % &quot;Midnight, on the water... &lt;br&gt;
%% Fuquay-Varina, NC            %  I saw...  the ocean's daughter.&quot; &lt;br&gt;
%%% 919-577-9882                % 'Can't Get It Out Of My Head' &lt;br&gt;
%%%% &amp;lt;yates@ieee.org&amp;gt;           % *El Dorado*, Electric Light Orchestra&lt;br&gt;
&lt;a href=&quot;http://home.earthlink.net/~yatescr&quot;&gt;http://home.earthlink.net/~yatescr&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Wed, 22 Nov 2006 23:51:27 -0500</pubDate>
      <title>Re: Changing Legend transparency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500#343914</link>
      <author>Dorothy</author>
      <description>&lt;br&gt;
&quot;Randy Yates =D0=B4=B5=C0=A3=BA&lt;br&gt;
&quot;&lt;br&gt;
&amp;gt; When I first add a legend, it has a black border and&lt;br&gt;
&amp;gt; it is non-transparent. If I execute &quot;legend boxoff&quot;,&lt;br&gt;
&amp;gt; the black border goes away AND the legend becomes&lt;br&gt;
&amp;gt; transparent. How do I turn off the border and keep&lt;br&gt;
&amp;gt; the legend non-transparent?&lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; %  Randy Yates                  % &quot;Midnight, on the water...&lt;br&gt;
&amp;gt; %% Fuquay-Varina, NC            %  I saw...  the ocean's daughter.&quot;&lt;br&gt;
&amp;gt; %%% 919-577-9882                % 'Can't Get It Out Of My Head'&lt;br&gt;
&amp;gt; %%%% &amp;lt;yates@ieee.org&amp;gt;           % *El Dorado*, Electric Light Orchestra&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://home.earthlink.net/~yatescr&quot;&gt;http://home.earthlink.net/~yatescr&lt;/a&gt;&lt;br&gt;
You can right-click the legend frame and choose the &quot;properities&quot; to&lt;br&gt;
edit it.</description>
    </item>
    <item>
      <pubDate>Thu, 23 Nov 2006 12:19:27 -0500</pubDate>
      <title>Re: Changing Legend transparency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500#343940</link>
      <author>Geordie</author>
      <description>Randy,&lt;br&gt;
&lt;br&gt;
I take it that you just want to hide the box around the legend and keep the &lt;br&gt;
background colour:&lt;br&gt;
&lt;br&gt;
to do this I would set the edge colour of the legend to match the background &lt;br&gt;
color. See below&lt;br&gt;
&lt;br&gt;
Plot(x,y); % plot data&lt;br&gt;
h=legend('test'); %create lengend&lt;br&gt;
set(h,'EdgeColor',[1 1 1]); %set the edge colour of the legend to white &lt;br&gt;
which should be the default of the background&lt;br&gt;
&lt;br&gt;
SC&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Randy Yates&quot; &amp;lt;yates@ieee.org&amp;gt; wrote in message &lt;br&gt;
news:m3odqy20y9.fsf@ieee.org...&lt;br&gt;
&amp;gt; When I first add a legend, it has a black border and&lt;br&gt;
&amp;gt; it is non-transparent. If I execute &quot;legend boxoff&quot;,&lt;br&gt;
&amp;gt; the black border goes away AND the legend becomes&lt;br&gt;
&amp;gt; transparent. How do I turn off the border and keep&lt;br&gt;
&amp;gt; the legend non-transparent?&lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; %  Randy Yates                  % &quot;Midnight, on the water...&lt;br&gt;
&amp;gt; %% Fuquay-Varina, NC            %  I saw...  the ocean's daughter.&quot;&lt;br&gt;
&amp;gt; %%% 919-577-9882                % 'Can't Get It Out Of My Head'&lt;br&gt;
&amp;gt; %%%% &amp;lt;yates@ieee.org&amp;gt;           % *El Dorado*, Electric Light Orchestra&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://home.earthlink.net/~yatescr&quot;&gt;http://home.earthlink.net/~yatescr&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Thu, 23 Nov 2006 14:25:38 -0500</pubDate>
      <title>Re: Changing Legend transparency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500#343954</link>
      <author>Randy Yates</author>
      <description>&quot;Geordie&quot; &amp;lt;steve.corsbie@baesystems.com&amp;gt; writes:&lt;br&gt;
&lt;br&gt;
&amp;gt; Randy,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I take it that you just want to hide the box around the legend and keep the &lt;br&gt;
&amp;gt; background colour:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; to do this I would set the edge colour of the legend to match the background &lt;br&gt;
&amp;gt; color. See below&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Plot(x,y); % plot data&lt;br&gt;
&amp;gt; h=legend('test'); %create lengend&lt;br&gt;
&amp;gt; set(h,'EdgeColor',[1 1 1]); %set the edge colour of the legend to white &lt;br&gt;
&amp;gt; which should be the default of the background&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; SC&lt;br&gt;
&lt;br&gt;
Hi SC,&lt;br&gt;
&lt;br&gt;
Thank you for your response.&lt;br&gt;
&lt;br&gt;
There is no such 'EdgeColor' property. Are we using the same version?&lt;br&gt;
I'm using 6.1.0.450 (R12.1).&lt;br&gt;
-- &lt;br&gt;
%  Randy Yates                  % &quot;She tells me that she likes me very much,&lt;br&gt;
%% Fuquay-Varina, NC            %     but when I try to touch, she makes it&lt;br&gt;
%%% 919-577-9882                %                            all too clear.&quot;&lt;br&gt;
%%%% &amp;lt;yates@ieee.org&amp;gt;           %        'Yours Truly, 2095', *Time*, ELO  &lt;br&gt;
&lt;a href=&quot;http://home.earthlink.net/~yatescr&quot;&gt;http://home.earthlink.net/~yatescr&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Thu, 23 Nov 2006 14:34:28 -0500</pubDate>
      <title>Re: Changing Legend transparency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500#343955</link>
      <author>Randy Yates</author>
      <description>&quot;Dorothy&quot; &amp;lt;dorothys.yuan@gmail.com&amp;gt; writes:&lt;br&gt;
&lt;br&gt;
&amp;gt; &quot;Randy Yates &#208;&#180;&#181;&#192;&#163;&#186;&lt;br&gt;
&amp;gt; &quot;&lt;br&gt;
&amp;gt;&amp;gt; When I first add a legend, it has a black border and&lt;br&gt;
&amp;gt;&amp;gt; it is non-transparent. If I execute &quot;legend boxoff&quot;,&lt;br&gt;
&amp;gt;&amp;gt; the black border goes away AND the legend becomes&lt;br&gt;
&amp;gt;&amp;gt; transparent. How do I turn off the border and keep&lt;br&gt;
&amp;gt;&amp;gt; the legend non-transparent?&lt;br&gt;
&amp;gt;&amp;gt; --&lt;br&gt;
&amp;gt;&amp;gt; %  Randy Yates                  % &quot;Midnight, on the water...&lt;br&gt;
&amp;gt;&amp;gt; %% Fuquay-Varina, NC            %  I saw...  the ocean's daughter.&quot;&lt;br&gt;
&amp;gt;&amp;gt; %%% 919-577-9882                % 'Can't Get It Out Of My Head'&lt;br&gt;
&amp;gt;&amp;gt; %%%% &amp;lt;yates@ieee.org&amp;gt;           % *El Dorado*, Electric Light Orchestra&lt;br&gt;
&amp;gt;&amp;gt; &lt;a href=&quot;http://home.earthlink.net/~yatescr&quot;&gt;http://home.earthlink.net/~yatescr&lt;/a&gt;&lt;br&gt;
&amp;gt; You can right-click the legend frame and choose the &quot;properities&quot; to&lt;br&gt;
&amp;gt; edit it.&lt;br&gt;
&lt;br&gt;
Hi Dorothy,&lt;br&gt;
&lt;br&gt;
Thanks for your response.&lt;br&gt;
&lt;br&gt;
There are two problems:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;1. I can't see a property for the legend border&lt;br&gt;
&amp;nbsp;&amp;nbsp;2. I need to do this programmatically rather than interactively.&lt;br&gt;
&lt;br&gt;
--Randy&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
%  Randy Yates                  % &quot;...the answer lies within your soul&lt;br&gt;
%% Fuquay-Varina, NC            %       'cause no one knows which side&lt;br&gt;
%%% 919-577-9882                %                   the coin will fall.&quot;&lt;br&gt;
%%%% &amp;lt;yates@ieee.org&amp;gt;           %  'Big Wheels', *Out of the Blue*, ELO&lt;br&gt;
&lt;a href=&quot;http://home.earthlink.net/~yatescr&quot;&gt;http://home.earthlink.net/~yatescr&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Thu, 23 Nov 2006 14:46:14 -0500</pubDate>
      <title>Re: Changing Legend transparency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500#343959</link>
      <author>Geordie</author>
      <description>Randy,&lt;br&gt;
&lt;br&gt;
I'm using 2006a and b.&lt;br&gt;
&lt;br&gt;
I'll load up my r12 and see if I can get that to work&lt;br&gt;
&lt;br&gt;
SC&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Randy Yates&quot; &amp;lt;yates@ieee.org&amp;gt; wrote in message &lt;br&gt;
news:m3slgaz1ct.fsf@ieee.org...&lt;br&gt;
&amp;gt; &quot;Geordie&quot; &amp;lt;steve.corsbie@baesystems.com&amp;gt; writes:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Randy,&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; I take it that you just want to hide the box around the legend and keep &lt;br&gt;
&amp;gt;&amp;gt; the&lt;br&gt;
&amp;gt;&amp;gt; background colour:&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; to do this I would set the edge colour of the legend to match the &lt;br&gt;
&amp;gt;&amp;gt; background&lt;br&gt;
&amp;gt;&amp;gt; color. See below&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Plot(x,y); % plot data&lt;br&gt;
&amp;gt;&amp;gt; h=legend('test'); %create lengend&lt;br&gt;
&amp;gt;&amp;gt; set(h,'EdgeColor',[1 1 1]); %set the edge colour of the legend to white&lt;br&gt;
&amp;gt;&amp;gt; which should be the default of the background&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; SC&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Hi SC,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thank you for your response.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; There is no such 'EdgeColor' property. Are we using the same version?&lt;br&gt;
&amp;gt; I'm using 6.1.0.450 (R12.1).&lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; %  Randy Yates                  % &quot;She tells me that she likes me very &lt;br&gt;
&amp;gt; much,&lt;br&gt;
&amp;gt; %% Fuquay-Varina, NC            %     but when I try to touch, she makes &lt;br&gt;
&amp;gt; it&lt;br&gt;
&amp;gt; %%% 919-577-9882                %                            all too &lt;br&gt;
&amp;gt; clear.&quot;&lt;br&gt;
&amp;gt; %%%% &amp;lt;yates@ieee.org&amp;gt;           %        'Yours Truly, 2095', *Time*, ELO&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://home.earthlink.net/~yatescr&quot;&gt;http://home.earthlink.net/~yatescr&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Thu, 23 Nov 2006 15:18:43 -0500</pubDate>
      <title>Re: Changing Legend transparency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500#343961</link>
      <author>Geordie</author>
      <description>Sorry Randy for building your hopes up, but I can't do it in release 12.1&lt;br&gt;
&lt;br&gt;
They have added more functionality so I would suggest upgrading to a newer &lt;br&gt;
version if you can&lt;br&gt;
&lt;br&gt;
SC&lt;br&gt;
&lt;br&gt;
&quot;Randy Yates&quot; &amp;lt;yates@ieee.org&amp;gt; wrote in message &lt;br&gt;
news:m3slgaz1ct.fsf@ieee.org...&lt;br&gt;
&amp;gt; &quot;Geordie&quot; &amp;lt;steve.corsbie@baesystems.com&amp;gt; writes:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Randy,&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; I take it that you just want to hide the box around the legend and keep &lt;br&gt;
&amp;gt;&amp;gt; the&lt;br&gt;
&amp;gt;&amp;gt; background colour:&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; to do this I would set the edge colour of the legend to match the &lt;br&gt;
&amp;gt;&amp;gt; background&lt;br&gt;
&amp;gt;&amp;gt; color. See below&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Plot(x,y); % plot data&lt;br&gt;
&amp;gt;&amp;gt; h=legend('test'); %create lengend&lt;br&gt;
&amp;gt;&amp;gt; set(h,'EdgeColor',[1 1 1]); %set the edge colour of the legend to white&lt;br&gt;
&amp;gt;&amp;gt; which should be the default of the background&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; SC&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Hi SC,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thank you for your response.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; There is no such 'EdgeColor' property. Are we using the same version?&lt;br&gt;
&amp;gt; I'm using 6.1.0.450 (R12.1).&lt;br&gt;
&amp;gt; -- &lt;br&gt;
&amp;gt; %  Randy Yates                  % &quot;She tells me that she likes me very &lt;br&gt;
&amp;gt; much,&lt;br&gt;
&amp;gt; %% Fuquay-Varina, NC            %     but when I try to touch, she makes &lt;br&gt;
&amp;gt; it&lt;br&gt;
&amp;gt; %%% 919-577-9882                %                            all too &lt;br&gt;
&amp;gt; clear.&quot;&lt;br&gt;
&amp;gt; %%%% &amp;lt;yates@ieee.org&amp;gt;           %        'Yours Truly, 2095', *Time*, ELO&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://home.earthlink.net/~yatescr&quot;&gt;http://home.earthlink.net/~yatescr&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Thu, 23 Nov 2006 10:43:02 -0500</pubDate>
      <title>Re: Changing Legend transparency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500#343966</link>
      <author>Jerome</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
here are all the properties you need :&lt;br&gt;
&lt;br&gt;
x = -pi:pi/20:pi;&lt;br&gt;
plot(x,cos(x),'-ro',x,sin(x),'-.b')&lt;br&gt;
h = legend('cos','sin',2);&lt;br&gt;
&lt;br&gt;
set(h,'box','on', ...&lt;br&gt;
'color','y', ...&lt;br&gt;
'ycolor','m', ...&lt;br&gt;
'xcolor','b', ...&lt;br&gt;
'visible','on')&lt;br&gt;
&lt;br&gt;
J&#233;r&#244;me</description>
    </item>
    <item>
      <pubDate>Sun, 26 Nov 2006 22:10:04 -0500</pubDate>
      <title>Re: Changing Legend transparency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500#344358</link>
      <author>Randy Yates</author>
      <description>J&#233;r&#244;me &amp;lt;dutmatlab@yahoo.fr&amp;gt; writes:&lt;br&gt;
&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; here are all the properties you need :&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; x = -pi:pi/20:pi;&lt;br&gt;
&amp;gt; plot(x,cos(x),'-ro',x,sin(x),'-.b')&lt;br&gt;
&amp;gt; h = legend('cos','sin',2);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; set(h,'box','on', ...&lt;br&gt;
&amp;gt; 'color','y', ...&lt;br&gt;
&amp;gt; 'ycolor','m', ...&lt;br&gt;
&amp;gt; 'xcolor','b', ...&lt;br&gt;
&amp;gt; 'visible','on')&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
Hi Jerome,&lt;br&gt;
&lt;br&gt;
Thanks for that! A variation on your idea works for&lt;br&gt;
the screen:&lt;br&gt;
&lt;br&gt;
set((hl,'color','w','xcolor','w','ycolor','w');&lt;br&gt;
&lt;br&gt;
However, when I print (print('file.eps','-depsc2'))&lt;br&gt;
it's back to black borders. Arghh! How to get&lt;br&gt;
no borders when PRINTING?!???&lt;br&gt;
-- &lt;br&gt;
%  Randy Yates                  % &quot;With time with what you've learned, &lt;br&gt;
%% Fuquay-Varina, NC            %  they'll kiss the ground you walk &lt;br&gt;
%%% 919-577-9882                %  upon.&quot;&lt;br&gt;
%%%% &amp;lt;yates@ieee.org&amp;gt;           % '21st Century Man', *Time*, ELO&lt;br&gt;
&lt;a href=&quot;http://home.earthlink.net/~yatescr&quot;&gt;http://home.earthlink.net/~yatescr&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Mon, 27 Nov 2006 02:42:39 -0500</pubDate>
      <title>Re: Changing Legend transparency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500#344388</link>
      <author>Jerome</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
read this :&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;lt;&lt;a href=&quot;http://www.mathworks.com/support/solutions/data/1-16FH1.html&quot;&gt;http://www.mathworks.com/support/solutions/data/1-16FH1.html&lt;/a&gt;&amp;gt;&lt;br&gt;
&lt;br&gt;
You have to set the INVERTHARDCOPY property of the figure to OFF&lt;br&gt;
&lt;br&gt;
J&#233;r&#244;me</description>
    </item>
    <item>
      <pubDate>Tue, 28 Nov 2006 03:12:56 -0500</pubDate>
      <title>Re: Changing Legend transparency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136500#344575</link>
      <author>Randy Yates</author>
      <description>J&#233;r&#244;me &amp;lt;dutmatlab@yahoo.fr&amp;gt; writes:&lt;br&gt;
&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; read this :&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;  &amp;lt;&lt;a href=&quot;http://www.mathworks.com/support/solutions/data/1-16FH1.html&quot;&gt;http://www.mathworks.com/support/solutions/data/1-16FH1.html&lt;/a&gt;&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; You have to set the INVERTHARDCOPY property of the figure to OFF&lt;br&gt;
&lt;br&gt;
Actually I did not. I simply followed the instructions for&lt;br&gt;
6.x. (Apparently it was a matter of setting the xcolor and ycolor not&lt;br&gt;
to white but to the actual figure background color, which was [0.8 0.8&lt;br&gt;
0.8] on my system. These then get converted to white when printing when&lt;br&gt;
INVERTHARDCOpY is on.)&lt;br&gt;
&lt;br&gt;
Thanks for your help, Jerome!&lt;br&gt;
-- &lt;br&gt;
%  Randy Yates                  % &quot;And all that I can do&lt;br&gt;
%% Fuquay-Varina, NC            %  is say I'm sorry, &lt;br&gt;
%%% 919-577-9882                %  that's the way it goes...&quot;&lt;br&gt;
%%%% &amp;lt;yates@ieee.org&amp;gt;           % Getting To The Point', *Balance of Power*, ELO&lt;br&gt;
&lt;a href=&quot;http://home.earthlink.net/~yatescr&quot;&gt;http://home.earthlink.net/~yatescr&lt;/a&gt;</description>
    </item>
  </channel>
</rss>

