[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: |
Tue, 05 Feb 2013 09:17:32 -0500 |
On Feb 4, 2013, at 8:38 AM, Ben Abbott wrote:
>
> 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.
https://savannah.gnu.org/bugs/index.php?38263
https://savannah.gnu.org/bugs/index.php?38264
>> 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 legend's tontsize works for me.
graphics_toolkit gnuplot
close all
plot (rand (3))
h = legend ({"first", "second", "third"})
set (h, "fontsize", 20)
But does not work for FLTK.
https://savannah.gnu.org/bugs/index.php?38265
Ben
Re: legend and color, Ben Abbott, 2013/02/04