bugGNU Octave - Bugs: bug #62373, some plot functions ignore axes...

 
 

bug #62373: some plot functions ignore axes handle (interaction with newplot)

Submitter:  Markus Mützel <mmuetzel>
Submitted:  Wed 27 Apr 2022 06:02:13 PM UTC
 
Category:  Octave Function Severity:  4 - Important
Priority:  7 - High Item Group:  Regression
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Sat 30 Apr 2022 03:44:43 PM UTC, comment #2: 

Slightly modified test code which is easier to see that both plots end up in the same axes is

H1 = subplot(2,1,1);
H2 = subplot(2,1,2);
stairs(H1, 1:5,1:5, 'b')
stairs(H2, 1:5,5:-1:1, 'r')

Script is attached as tst_stairs.m

(file #53166)

Rik <rik5>
Project Administrator
Sat 30 Apr 2022 03:40:06 PM UTC, comment #1: 

This is complicated behavior at the heart of plotting in Octave.  I agree that my preferred course of action would be to revert the changeset on newplot.  I did that here http://hg.savannah.gnu.org/hgweb/octave/rev/7d5cb3dd312d.

I re-opened the other bug report (bug #61945) and made it a dependency of this bug report.

Rik <rik5>
Project Administrator
Wed 27 Apr 2022 06:02:13 PM UTC, original submission:  

Re-creating a bug report for the issue reported in patch #10200 so that it can be marked as a blocker for Octave 7.2.

The original report:
stairs ignores first arg: axes handle

H1 = subplot(2,1,1);
H2 = subplot(2,1,2);
stairs(H1, 1:5,1:5, 'b')
stairs(H2, 1:5,1:5, 'r')

both draw commands goes into last axes handle
This does not happen with plot(H, ...)

Addendum: This is a regression from bug #61945 for which `newplot` was changed to no longer set the current axes. (I pushed those changes probably a little to hastily.)
This does not only happen for `stairs` but for all plot functions that expect `newplot` to change the current axes. That is most probably true for functions that combine `newplot` with `__next_line_color__.m` and `__next_line_style__.m` (because the latter always act on the current axes).

Functions that combine those functions and might therefore be affected are:
- area.m
- plot3.m
- stairs.m
- bar.m
- stem.m

To be save, we should probably check all functions that use `newplot` (which are many)...

Should we revert the changes for bug #61945 and work out a proper fix for this before reapplying them on default?

Markus Mützel <mmuetzel>
Project Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #53166:  tst_stairs.m added by rik5 (95B - text/x-matlab)

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (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 project members can vote.

     

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-30 rik5 Attached File- Added tst_stairs.m, #53166
        Severity5 - Blocker 4 - Important
        Summarysome plot functions ignore axes handle some plot functions ignore axes handle (interaction with newplot)
    2022-04-30 rik5 Release7.1.0 dev
    2022-04-30 rik5 Dependencies- bugs #61945 is dependent
    2022-04-27 mmuetzel Priority5 - Normal 7 - High
    2022-04-27 mmuetzel Dependencies- patch #10200 is dependent

    Back to the top


    Powered by Savane 3.9