bugGNU Octave - Bugs: bug #37746, 'legend right' squeezes figure to...

 
 

bug #37746: 'legend right' squeezes figure to the left (using 'eastoutside')

Submitted by:  Muhali <muhali>
Submitted on:  Thu 15 Nov 2012 10:20:21 AM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Tue 04 Dec 2012 06:55:20 PM UTC, comment #2:

I'm going to add Ben to the CC list since he is more of an expert on this piece of code.

The problem seems to be in the large switch statement on position.

When the legend does not exist, ca_pos and ca_outpos variables work correctly in the equations to resize the current axis to accomodate the legend being placed on the outside. When the legend already exists, however, the accomodation has already been made but these equations don't take that into account. Instead they shrink the current axis again. In fact, there is some recursive updating taking place that I'm not sure is desired. If I set a breakpoint on the line then it gets executed 3 times for a single call to "legend right". This seems like overkill.

Rik <rik5>
Project Member
Tue 04 Dec 2012 05:48:40 AM UTC, comment #1:

Confirmed on a development tip (12/3/12). Worse, this is a regression from 3.6.3 which did work correctly.

A simpler piece of code to demonstrate the problem is:

The problem is with the "outside" portion. If I just use a location of "east" then things work as expected.

Rik <rik5>
Project Member
Thu 15 Nov 2012 10:20:21 AM UTC, original submission:

Executing this code, where only 'legend right' is added in the 2nd plot,

squeezes the entire figure too much to the left. The figure is attached.

Muhali <muhali>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #26915:  foo.png added by muhali (41kB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 03 Jan 2013 04:34:46 AM UTCrik5StatusNone=>Confirmed
    Tue 04 Dec 2012 06:55:20 PM UTCrik5Carbon-Copy-=>Added -unavailable-
    Tue 04 Dec 2012 05:48:40 AM UTCrik5Item GroupNone=>Regression
    Thu 15 Nov 2012 10:20:21 AM UTCmuhaliAttached File-=>Added foo.png, #26915

    Back to the top


    Powered by Savane 3.1-cleanup