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: Rik
Subject: [Octave-task-tracker] [task #14243] Rewrite legend.m
Date: Thu, 14 Nov 2019 13:30:43 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

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

I think this is very close to having sufficient functionality that you can
check the code in and we can continue development through ordinary bug reports
as any problems are found.

Before that, I did find the following regressions with the existing code.

Case #1 : "Orientation" property does not work after initial usage

Code to reproduce:


plot (rand (2, 4));
hl = legend ("orientation", "horizontal")
set (hl, "orientation", "vertical")


The "orientation" should switch, but it remains fixed at the initial value
even though the property itself is changed as can be checked by executing


get (hl, "orientation")


Case #2 : Font properties lost after hide/show sequence


plot (1:10);
hl = legend ("Hello World", "FontSize", 24);
legend hide
legend show


Case #3 : Spacing between axes text (xlabel, title, etc.) and legend is
order-dependent.

This one might be a long-term bug that is harder to fix.

Code to reproduce:


plot (1:10);
hl = legend ("Hello World", "FontSize", 24, "location", "northoutside");
title ({"Line1", "Line2", "Line3"});


In this case the legend overlaps the multi-line title.  However, if the title
is created before the legend then everything works.  


plot (1:10);
title ({"Line1", "Line2", "Line3"});
hl = legend ("Hello World", "FontSize", 24, "location", "northoutside");


Case #4 : setting "String" property results in callback execution error

Code to reproduce:


plot (1:10, 'o-')
hl = legend ('abc')
set (hl, 'string', 'Hello World')
execution error in graphics callback function


Case #5 : "bestoutside" location is incorrect for vertically oriented legends

When "bestoutside" is specified, the mapped location should be
"northeastoutside" if the legend is vertically oriented and "southoutside" if
the legend is horizontally oriented.  Currently, both orientations are mapped
to "southoutside".


plot (rand (2,4))
hl = legend ('location', 'bestoutside')


Case #6 : No warning that location "best" is not currently implemented.

"best" should place the legend object so that it overlaps the least with the
data being plotted.  There used to be a warning that Octave hasn't implemented
this property yet, and then the legend was placed in location "northeast".

Code to reproduce:


plot (1:10, 'o-');
hl = legend ("Hello World", "Location", "best")


The old warning was


warning: legend: 'best' not yet implemented for location specifier, using
'northeast' instead


Case #7: Setting "position" should change "location" to "none"


plot (1:10, 'o-')
hl = legend ('abc');
set (hl, 'position', [0.2, 0.2, 0.1, 0.1])
get (hl, 'location')
ans = northeast




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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