help-octave
[Top][All Lists]
Advanced

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

Re: legend and color


From: Ben Abbott
Subject: Re: legend and color
Date: Mon, 04 Feb 2013 08:38:41 -0500

On Feb 4, 2013, at 7:09 AM, Julien Bect wrote:

> 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 don't know if it is possible to change the color of the key entries for 
gnuplot, but should work for FLTK.  Please file a bug report.

> 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.


Changing the color of the text labels for for the legend entries can be made to 
work for FLTK.  So this looks like a bug to me.  Please file a bug report.

        https://savannah.gnu.org/bugs/?group=octave

Ben



reply via email to

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