octave-task-tracker
[Top][All Lists]
Advanced

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

[Octave-task-tracker] [task #14243] Rewrite legend.m


From: Pantxo Diribarne
Subject: [Octave-task-tracker] [task #14243] Rewrite legend.m
Date: Sat, 17 Dec 2016 20:37:18 -0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0

Follow-up Comment #2, task #14243 (project octave):

I think bug #49446 boils down to implementing the selection tool in Qt/Fltk
toolkits but indeed legend objects should be able to handle custom positioning
properly.

As a starter I'll dump here some test scripts (written ML compatible for
testing) that should pass and that currently pass or not with Octave's
implementation.


%%test <39697>
hf = figure ('visible', 'on');
plot (1:10);
hl = legend ('Legend Text');
title ({'Multi-line', 'titles', 'are a', 'problem'});
pos = get (gca, 'position');
axtop = sum (pos(2:2:4));
pos = get (hl, 'position');
legtop = sum (pos(2:2:4));
assert (legtop < axtop);
close (hf);

%%test <40333>
hf = figure ('visible', 'off');
plot (1:10);
hl = legend ('foo');
pos = get (gca, 'position');
set (hf, 'position', [0 0 200 200]);
set (hl, 'fontsize', 20);
%assert (all (get (gca, 'position') == pos));
close (hf);

%%test <41142>
hf = figure ('visible', 'off');
plot (rand (2));
legend ({'foo', 'bar'});
ht = findobj (gcf (), '-property', 'fontsize');
set (ht, 'fontsize', 16);
assert (all (cell2mat (get (ht, 'fontsize')) == 16))
close (hf);


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/task/?14243>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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