bugGNU Octave - Bugs: bug #48859, Legend in subplot: axis position...

 
 

bug #48859: Legend in subplot: axis position wrong

Submitter:  Martin Kunz <mkunz>
Submitted:  Mon 22 Aug 2016 03:12:24 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  mkunz Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 18 Nov 2019 08:39:05 PM UTC, comment #4: 

I can't verify with MS Windows, but this has been fixed on Linux.

Rik <rik5>
Group administrator
Mon 18 Nov 2019 09:44:44 AM UTC, comment #3: 

legend.m has been rewritten for (OpenGL toolkits only). This bug should now be fixed.

Marking ready for test.

Pantxo Diribarne <pantxo>
Group Member
Fri 26 May 2017 01:48:46 PM UTC, comment #2: 

Something similar when subplots are stacked vertically, only when the legend is outside the plot, the axis are not aligned anymore. Here is a sample script:


subplot(2,1,1)
plot([1 2],[1e5 2e5])
legend('test','location','eastoutside')

subplot(2,1,2)
plot([1 2],[1 2])
legend('test','location','eastoutside')


This happens on Linux and octave 4.2.1

Fabio <efferre79>
Wed 24 Aug 2016 12:46:42 AM UTC, comment #1: 

Another script which really shows the problem of rescaling the subplot axes sizes:


figure (1)
subplot (121)
plot (1:10)
legend ("1","location","westoutside")

subplot (122)
plot (1:10)
legend ("2","location","eastoutside")



Rik <rik5>
Group administrator
Mon 22 Aug 2016 03:12:24 PM UTC, original submission:  

When placing a legend next to a plot (by using an "*outside" location string), the position property of the current axis object is modified to make space for the legend. In a subplot layout with two columns, this works the wrong way in the second column, increasing the plot size instead of making it smaller.
Example:


figure(1)
subplot(121)
plot(1:10)
legend("1","location","eastoutside")

subplot(122)
plot(1:10)
input("Press Enter to continue","s"); legend("2","location","eastoutside")


After pressing the enter key, the plot on the right-hand side grows instead of shrinking to the same size as the first plot.

Martin Kunz <mkunz>

 

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

Attach Files:
   
   
Comment:
   

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 pantxo (Posted a comment)
  • -email is unavailable- added by efferre79 (Posted a comment)
  • -email is unavailable- added by efferre79
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mkunz (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-04 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2019-11-18 pantxo StatusConfirmed Ready For Test
    2017-05-26 efferre79 Carbon-Copy- Added efferre79
    2016-08-24 rik5 StatusNone Confirmed
        Release4.0.3 dev

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code