bugGNU Octave - Bugs: bug #56476, subplot without parentheses

 
 

bug #56476: subplot without parentheses

Submitter:  None
Submitted:  Wed 12 Jun 2019 12:35:00 AM UTC
   
 
Category:  Plotting Severity:  1 - Wish
Priority:  1 - Later Item Group:  Matlab Compatibility
Status:  Wont Fix Assigned to:  None
Originator Name:  Dubs Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 5.1.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 12 Jun 2019 12:52:39 AM UTC, comment #1: 

Octave doesn't generally try to reproduce undocumented behavior as it may change from version to version.  In this case, there is a straightforward workaround of using parentheses which would make any code portable between Matlab, Octave, and future versions of Matlab.

Although I'm closing report, it can still be found by searching in case future users come across the same issue.

Rik <rik5>
Group administrator
Wed 12 Jun 2019 12:35:00 AM UTC, original submission:  

Matlab allows the following use of subplot (though apparently not documented, it does work.)

subplot mnp

as the equivalent of

subplot (mnp)

Running the following code in matlab will result in two identical plot windows (figure 1 and figure 2) each with two plots in it sin and cos over a single period. When you run this in octave if throws an error when attempting to call subplot without the parentheses.


t = [0:0.1:2*pi];
a = sin(t);
b = cos(t);
figure(1);
clf;
subplot(211);
plot(t,a);
subplot (212);
plot(t,b);
figure(2);
clf;
subplot 211;
plot(t,a);
subplot 212;
plot(t,b);


Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #47077:  spex1.m added by None (190B - text/plain)

 

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 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
    2019-06-12 rik5 Severity3 - Normal 1 - Wish
        Priority5 - Normal 1 - Later
        StatusNone Wont Fix
        Open/ClosedOpen Closed
        Operating SystemMicrosoft Windows Any
    2019-06-12 None Attached File- Added spex1.m, #47077

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code