bugGNU Octave - Bugs: bug #32373, legend northeastoutside does not...

 
 

bug #32373: legend northeastoutside does not align properly

Submitter:  Ben Abbott <bpabbott>
Submitted:  Sun 06 Feb 2011 08:11:40 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Ben Abbot Open/Closed:  * Closed
Release:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 08 Feb 2011 09:12:46 PM UTC, comment #5: 

Ben, this now works so I'm closing this bug
D.

David Bateman <dbateman>
Group Member
Sun 06 Feb 2011 10:28:48 PM UTC, comment #4: 

Ignoring the part of

http://hg.savannah.gnu.org/hgweb/octave/rev/6ba430a75553

that I didn't want to commit in src/. The attached changeset is what I meant. Yes thee behavior of outerposition with subplot looks odd to me.

D.

David Bateman <dbateman>
Group Member
Sun 06 Feb 2011 10:11:44 PM UTC, comment #3: 

It looks to me as if subplot has modified the outerposition.


h1 = subplot (2, 2, 1);
get (h1, "position")
ans =   0.13000   0.58384   0.33466   0.34116
get (h1, "outerposition")
ans =   0.090714   0.539289   0.412704   0.404759


It is likely that I am responsible for this behavior. I have a recollection of running several test cases in Matlab and fitting to the position/outerposition properties. Perhaps something more intelligent should be done.


Ben Abbott <bpabbott>
Group Member
Sun 06 Feb 2011 09:54:25 PM UTC, comment #2: 

I don't think your patch is quite right. I believe something like is needed as you haven't correctly the outerposition.. I also added a small padding.

D.


(file #22613)

David Bateman <dbateman>
Group Member
Sun 06 Feb 2011 09:51:18 PM UTC, comment #1: 

I've pushed a changeset.

http://hg.savannah.gnu.org/hgweb/octave/rev/4d30b4136a3e

There are some remaining problems.

(1) Tightinset info needs to be used to properly place the legend object.
(2) The subplots leave a lot of space around the border of the figure. Should their outerpositions go to the figure's edge?

Ben Abbott <bpabbott>
Group Member
Sun 06 Feb 2011 08:11:40 PM UTC, original submission:  

For the example below the axis and legend boxes should be aligned at their top edges.


clf
x = 0:10;
plot (x, rand (11));
xlabel ("Indices")
ylabel ("Random Values")
title ("Data and Legend boxes should align at the top")
legend (cellstr (num2str ((1:10)')), "location", "northeastoutside")
legend boxon
axis ([0, 10, 0 1])


The problem is most easily seen for the fltk backend. However, for gnuplot, the axis position property is also shifted so as to produce enough room for the legend's box above.

Ben Abbott <bpabbott>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #22613:  patch.legend added by dbateman (6KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dbateman (Updated the item)
  • -email is unavailable- added by bpabbott (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-02-08 dbateman StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2011-02-06 dbateman Attached File- Added patch.legend, #22613
    2011-02-06 bpabbott StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code