help-octave
[Top][All Lists]
Advanced

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

Re: legend and color


From: Julien Bect
Subject: Re: legend and color
Date: Mon, 04 Feb 2013 13:09:20 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

On 04/02/2013 12:38, CdeMills wrote:
I'm generating a graph by emitting a few curves with different colors (hold
is on), then calling 'legend'. But the legends colors do not match the line
colors. Scaling down the problem:
octave> plot(1:10, 10:-1:1)
octave> hl=legend('test'); hc=get(hl, 'children');
octave> get(hc(2), 'type')
ans = text
octave> set(hc(2), 'color', [1 0 0])

the trouble is that the text 'test'  appearing as the legend does not change
color on the screen; while its 'color' property was changed. Any idea why
the color seems to come from the parent (which itself is an "axe" object) ?
The same code succeeds if the original object is an handle returned by the
text() function.

Context: McOS 10.8, octave-devel from MacPorts (3.6.3), gnuplot 4.6
associated to an "Aqua" terminal.

I have the same problem under both Octave 3.6.2 and a fresh 3.7.1+ build of the default branch (both in Ubuntu 12.10 / i686-pc-linux-gnu).

The problem exists both with gnuplot and FLTK as graphical toolkits.

I have also tried to modify the 'FontSize' property for hc(2). The result is slightly different : it works with FLTK but does nothing with gnuplot.

Julien.


reply via email to

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