bugGNU Octave - Bugs: bug #52289, subplot not behaving uniformly

 
 

bug #52289: subplot not behaving uniformly

Submitter:  Muhali <muhali>
Submitted:  Thu 26 Oct 2017 04:54:30 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 22 Aug 2022 02:18:40 PM UTC, comment #5: 

So this seems to have been fixed automagically. I'll close this report as "fixed".

Thanks for following up.

Pantxo Diribarne <pantxo>
Group Member
Thu 18 Aug 2022 07:17:11 AM UTC, comment #4: 

the unique result (stable/dev) I now get is

   0.7520   0.3123

Muhali <muhali>
Thu 18 Aug 2022 04:17:44 AM UTC, comment #3: 

Is this specific to GNU/Linux?
Using 6.1.0 mac.

Muhali

>> disp([pos{1}(3:4) ; pos{2}(3:4)])
   0.7361   0.3092
   0.7361   0.3092


Pantxo

>> disp([pos{1}(3:4) ; pos{2}(3:4)])
   0.7361   0.3092
   0.7361   0.3092


Anonymous
Thu 26 Oct 2017 05:49:40 PM UTC, comment #2: 

Yes, this is a known issue with colorbar and legend: those functions change the "activepositionproperty" of their corresponding axes, which makes subplot size not be updated correctly. The workaround is to draw legends (or colorbars) last:


graphics_toolkit qt
figure(1) ; clf ;
set(1, 'paperpositionmode', 'auto')
ax(1) = subplot(2,1,1) ;
plot(1:5)
xlabel XLABEL
title TITLE
ax(2) = subplot(2,1,2) ;
plot(1:5)
xlabel XLABEL
title TITLE
legend(ax(1),'LEG', 'location', 'northeastoutside')
legend(ax(2),'LEG', 'location', 'northeastoutside')
pos = get(ax, 'position') ;
disp([pos{1}(3:4) ; pos{2}(3:4)])


Pantxo Diribarne <pantxo>
Group Member
Thu 26 Oct 2017 05:11:53 PM UTC, comment #1: 

Confirm also with fltk backend.
The actual numbers for pos depend slightly on the font.

Dmitri.

Dmitri A. Sergatskov <dasergatskov>
Thu 26 Oct 2017 04:54:30 PM UTC, original submission:  

Executing


graphics_toolkit qt
figure(1) ; clf ;
set(1, 'paperpositionmode', 'auto')
ax(1) = subplot(2,1,1) ;
plot(1:5)
xlabel XLABEL
title TITLE
legend('LEG', 'location', 'northeastoutside')
ax(2) = subplot(2,1,2) ;
plot(1:5)
xlabel XLABEL
title TITLE
legend('LEG', 'location', 'northeastoutside')
pos = get(ax, 'position') ;
disp([pos{1}(3:4) ; pos{2}(3:4)])


should result in two subplots of equal size, but it doesn't. The example does not show a big effect, but I noticed this behaviour in a case where in fact the bottom title and the top xlabel overlapped.

I also noticed that stable and dev are slightly different:

stable:
   0.76992   0.33843
   0.76992   0.30274

dev:
   0.76992   0.33843
   0.76992   0.30036


Matlab and gnuplot work fine.

Muhali <muhali>

 

(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 dasergatskov (Posted a comment)
  • -email is unavailable- added by muhali (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
    2022-08-22 pantxo StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2017-10-26 pantxo StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code