bugGNU Octave - Bugs: bug #53670, subplot handle changes after...

 
 

bug #53670: subplot handle changes after window resizing

Submitter:  None
Submitted:  Mon 16 Apr 2018 06:07:08 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Tony Richardson Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 14 Mar 2023 03:55:39 AM UTC, comment #4: 

repeating comment #3 behavior with v8.1, this appears to have been fixed. closing report.

Nicholas Jankowski <nrjank>
Group Member
Wed 25 Aug 2021 11:50:54 PM UTC, comment #3: 

trying this on Octave 6.3.0:


 蘤₻>> h = subplot(2,4,4)
h = -6.9597
>> plot(1:10)
>> ##stretch window by dragging mouse
>> h2 = subplot(2,4,4)
h2 = -6.9597
>> close all;clear;
>> h = subplot(2,4,4)
h = -6.3472
>> plot(1:10)
>> ##maximize window using Maximize button
>> h2 = subplot(2,4,4)
h2 = -6.3472


maybe this was fixed between 6.1 and 6.3?

Nicholas Jankowski <nrjank>
Group Member
Wed 25 Aug 2021 11:17:36 PM UTC, comment #2: 

Using 6.1.0


>>  h = subplot (2,4,4)
h = -8.5034
>> plot (1:10);


Then maximise plot (using radio button)

>> h2 = subplot (2,4,4)

h2 = -8.5034
-verbatim-

h=h2
However, the figure is still destroyed.
And the command of close all needs to be run

If instead use the pointer and drag to make it bigger the figure stays
and h=h2

Anonymous
Mon 16 Apr 2018 08:26:31 PM UTC, comment #1: 

Confirmed.  There isn't any time to fix this before the 4.4 release, but it has been a problem going pretty far back.

A more destructive way to see what is going on is


h = subplot (2,4,4)
plot (1:10);
## Resize window to be very large
h2 = subplot (2,4,4)


Not only will h != h2, but subplot has determined that there was no plot in the location so it deletes the axes object (destroying the plot (1:10)) and then creates an empty axes object.


Rik <rik5>
Group administrator
Mon 16 Apr 2018 06:07:08 PM UTC, original submission:  

If I enter

h = subplot(2, 4, 4)

I get back a particular handle value.  If I resize the window and then enter the same command I get back a different value.  I am not sure if this is expected behavior, but it does seem to be incompatible with MATLAB (which returns equal objects).

I first encountered this is a related problem when I first did

h = subplot(2, 4, [1:3])

and then after window resizing tried to get a subplot for the same area using

subplot(h)

subsequent plots no longer covered the 1:3 area of the
(resized) window though.  This technique works in MATLAB.  I can work around the issue by using

subplot(2, 4, [1:3])

everytime I want to plot in that area.

Tony Richardson

Anonymous

 

(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 nrjank (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (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
    2023-03-14 nrjank StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2018-04-16 rik5 Item GroupMatlab Compatibility Incorrect Result
        StatusNone Confirmed
        Release4.2.2 dev
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code