bugGNU Octave - Bugs: bug #39395, legend spacing ignores fontsize


bug #39395: legend spacing ignores fontsize

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Tue 02 Jul 2013 09:45:50 AM UTC  
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Fixed Assigned to:  Rik <rik5>
Originator Name:  Ben Abbott Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 08 Oct 2013 12:10:04 PM UTC, comment #2:

I did a couple of quick tests. You change works for me on MacOS X. I'm closing it.

Ben Abbott <bpabbott>
Project Member
Tue 08 Oct 2013 04:44:55 AM UTC, comment #1:

Independent of this bug report, I re-wrote legend to do basically what you suggested. Any property which could affect the amount of space taken up by the text labels, such as 'fontsize' or 'fontunits', causes the legend to be reconstructed. It appears to work okay for printing with the FLTK toolkit though. Do you want to keep this report open?

Rik <rik5>
Project AdministratorIn charge of this item.
Tue 02 Jul 2013 09:45:50 AM UTC, original submission:

The 1st demo for legend.m is

The resulting fontsize is correct for both the gnuplot and fltk toolkits, but the line spacing between the legend's keys does not change. The result is that the keys are too close together.

To fix this the entire legend must be reconstructed. Unfortunately, if the fontsize listener is modified to @updatelegend the key objects are deleted and replace by new ones. This introduces problems for the print command which attempt to temporarily modified the fontsize of all objects. Which is a problem if the same objects do not exist when print() attempt to return the fontsizes to their original values.

Also, replace key objects is inconsistent with Matlab, as is demonstrated below.

A rewrite of legend() looks to be needed. In doing so, it wouldn't hurt to copy the info Mathworks saves to the legend's userdata property.

Ben Abbott <bpabbott>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by bpabbott (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-08 bpabbott StatusNone => Fixed
        Assigned toNone => rik5
        Open/ClosedOpen => Closed
    2013-08-16 bpabbott Assigned tobpabbott => None
    2013-07-19 bpabbott Assigned toNone => bpabbott

    Back to the top

    Powered by Savane 3.3