bugGNU Octave - Bugs: bug #66222, colorbar distorts vertical...

 
 

bug #66222: colorbar distorts vertical positioning of subplot

Submitter:  Muhali <muhali>
Submitted:  Mon 16 Sep 2024 11:24:49 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 9.2.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 27 Sep 2024 08:37:47 PM UTC, comment #3: 

Thanks! I can reproduce the issue on both 9.2.1 and 10.0.
Playing around with this example I noticed at least two problems, which may or may not be related.

First of all, calling "xlable()" does not re-size the plot until
another "subplot()" is called:


octave:1> set(0, "defaultaxesfontsize", 24)
octave:2> subplot(1, 2, 1) ;
octave:3> xlabel("longitude")
octave:4> subplot(1, 2, 1) # has no effect
octave:5> subplot(1, 2, 2) # now Y-axis is re-sized to fit the label


Another one is that "colorbar()" seems to inhibits resizing of the axis (as in your original example). Somebody else needs to look at the code to figure out what is happening.
A workaround is to call "colorbar()" the last, e.g.:

octave:1> set(0, "defaultaxesfontsize", 24)
octave:2> subplot(1, 2, 1)
octave:3> xlabel("longitude")
octave:4> subplot(1, 2, 2)
octave:5> xlabel("longitude")
octave:6> subplot(1, 2, 1)
octave:7> colorbar


Dmitri.
--


 

Dmitri A. Sergatskov <dasergatskov>
Tue 17 Sep 2024 07:58:17 AM UTC, comment #2: 

sorry. You need to add

set(0, "defaultaxesfontsize", 24) ;

to make it more visible, see attached figure.


Muhali <muhali>
Mon 16 Sep 2024 03:19:35 PM UTC, comment #1: 

Can you post a screenshot? I do not see this problem with mine (flatpak 9.2.0 version, attached).


Dmitri.
--



Dmitri A. Sergatskov <dasergatskov>
Mon 16 Sep 2024 11:24:49 AM UTC, original submission:  

Using

subplot(1, 2, 1) ;
xlabel("longitude") ;
colorbar
subplot(1, 2, 2) ;
xlabel("longitude") ;

shows that colorbar distorts the vertical positioning.

Muhali <muhali>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #56435:  foo.png added by muhali (37KiB - image/png)
file #56433:  colorbar_das.png added by dasergatskov (19KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dasergatskov (Updated the item)
  • -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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-09-17 muhali Attached File- Added foo.png, #56435
    2024-09-16 dasergatskov Attached File- Added colorbar_das.png, #56433

    Back to the top

    Powered by Savane 3.13-5884.
    Corresponding source code