bugGNU Octave - Bugs: bug #62526, Invalid variable access in subplot...


bug #62526: Invalid variable access in subplot when mixing indexing and position form

Submitter:  None
Submitted:  Thu 26 May 2022 01:43:10 PM UTC
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Ulf Lorenz Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 7.1.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Fri 27 May 2022 03:21:56 PM UTC, comment #2: 

Verified that the code no longer produces an error and that the output appears equivalent to Matlab.  Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Thu 26 May 2022 05:49:41 PM UTC, comment #1: 

Thank you for your report.

I pushed a change to the stable branch that should fix this issue:

It should be part of Octave 7.2.0.

Marking as ready for test.

Markus M├╝tzel <mmuetzel>
Group administrator
Thu 26 May 2022 01:43:10 PM UTC, original submission:  

subplot() has two usages, either you give a numbr of rows and columns and select the axis with an index, or you can request the axis by setting the 'position' of the subplot. When mixing these two, you get an error. For example,

subplot(2, 2, 1)
subplot('position', [0.5, 0.5, 0.3, 0.3])

returns an error in the second line in subplot.m, line 296. The error comes from the fact that a variable "rows" is requested that has not been submitted in the function call.

The problem seems to have been introduced when fixing bug #59076, it is not present in Octave 5.2.

I am aware that mixing these two forms is a bit special, so the error may well be intentional. On the other hand, it is  a regression and that Matlab eats this setup just fine.



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

Attach Files:

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 rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)

    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-05-27 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2022-05-26 mmuetzel StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-7c56.
    Corresponding source code