bugGNU Octave - Bugs: bug #49382, legend position inaccurate with...

 
 

bug #49382: legend position inaccurate with subplots

Submitter:  Hartmut <hardy>
Submitted:  Tue 18 Oct 2016 06:46:36 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.0-rc2 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 18 Oct 2016 08:26:38 PM UTC, comment #1: 

This is a known issue, the legend position is not updated when its corresponding axes position changes. Subplot are dynamic objects which adapt their size depending on neighbor axes size: when the second subplot appears it forces the first one to be resized hence the wrong legend position. See bug #39697

Closing report as duplicate of the above.


Pantxo Diribarne <pantxo>
Group Member
Tue 18 Oct 2016 06:46:36 PM UTC, original submission:  

Here is a little script to show the behavior:

clear, close all
graphics_toolkit qt

figure
subplot(2,1,1);
plot(1:5)
legend('legend text at wrong position (too high)');
% if you stop the script here, via a "break" command, then it will be fine
subplot(2,1,2);
plot(1:5)
legend('legend text at proper position');


The legend in the upper subplot is printed at a too high position. Depending on the screen resolution (or fontsize?) this is more or less obvious.

If you stop the script at the marked position (before creating the second subplot), then the legend position will stay correct.

This happens with graphics_toolkit qt as well as fltk. Gnuplot is fine in this respect.

This happens with Octave 4.0.3, and with Octave 4.2.0-rc2, on Linux and on Windows.

I wasn't sure if this is part of the behavior in bug #39697, that's why I opened a new bug report. I naively assume that NO listener would be necessary to fix this issue here, the subplot sizes should be known in advance.


Hartmut <hardy>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

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 hardy (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-10-18 pantxo StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #39697

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code