octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Legend compatibility help


From: c.
Subject: Re: Legend compatibility help
Date: Wed, 2 Oct 2013 19:00:17 +0200


On 2 Oct 2013, at 18:24, Rik <address@hidden> wrote:

10/2/13

Could someone with access to Matlab run the following?

Hi,
I have:

>> version

ans =

7.12.0.635 (R2011a)

%% Test if there is a listener on DisplayName property
h = plot (rand (3,3));
hl = legend ();
%% At this point, legend is data1, data2, data3

actually, I see no legend at this point
and hl is an empty matrix

>> hl

hl =

     []

set (h(1), 'DisplayName', 'This is a Long String')
%% Is legend updated?

no

%% What about doing?
legend hide
legend show
%% Is legend updated now?


Yes, the legend at this point is:

'This is a Long String'
'data2'
'data3'

%% What does Matlab display for surface objects?
z = peaks ();
surf (z);
hl = legend ('surf1');
print -dpng surfleg.png

see attachment.

%% Similarly, what does Matlab display for contour objects?
contourc (z);                <---- this does not show a plot, I used "contour" instead of "contourc"
hl = legend ('contour1');
print -dpng contourleg.png

png attached.

Thanks in advance,
Rik

HTH,
c.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]