bugGNU Octave - Bugs: bug #43478, First plot in a multiplot figure...

 
 

bug #43478: First plot in a multiplot figure does not "hold on" with in a loop

Submitter:  None
Submitted:  Mon 27 Oct 2014 11:54:58 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.2
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 19 Nov 2014 09:53:03 AM UTC, comment #3: 

Hi,

For some reason, the second time you try to plot in the left axes (1,3,1), the axes is not recognized as being a part of the subplot series. It is thus deleted/recreated. See the following example:


ax1 = subplot (1,3,1);
set (ax1, "deletefcn", "disp ("deleted axes n#1")")
subplot (1,3,2);

subplot (1,3,1); # => deleted axes n#1


This issue (and the fact that it does not happen with two columns) is already reported in bug #42033.
Closing report as duplicate.

Pantxo Diribarne <pantxo>
Group Member
Tue 28 Oct 2014 10:07:56 AM UTC, comment #2: 

That is true. More over, in the original script, if you replace:

subplot (1, 3, 1) -> subplot (1, 2, 1)
subplot (1, 3, 2) -> subplot (1, 2, 2)

The script will work without problems.

Anonymous
Mon 27 Oct 2014 12:46:56 PM UTC, comment #1: 

This shows that the problem is with location 1, 3, 1  not the first subplot that is drawn.

lf

for i=1:3

  if (i==1)
    mrk='r-';
  else
    mrk='b-';
  endif

  figure(1)
  hold on
 
  subplot (1, 3, 2)
  plot(1.2*i*[-10:10],i* sin(i*[-10:10]),mrk); hold on;

  subplot (1, 3, 1)
  plot(i*[-10:10], sin(i*[-10:10]),mrk); hold on;

  %print("ex", '-depsc2')

endfor

Doug Stewart <dastew>
Mon 27 Oct 2014 11:54:58 AM UTC, original submission:  

Hi,

In the following simple script to reproduce the bug: the first and the second subplot should be identical but they are not.

for i=1:2

  if (i==1)
    mrk='r-';
  else
    mrk='k-';
  endif
 
  subplot (1, 3, 1)
  plot(i*[-10:10], sin(i*[-10:10]),mrk); hold on;
 
  subplot (1, 3, 2)
  plot(i*[-10:10], sin(i*[-10:10]),mrk); hold on;
 
  print("ex", '-depsc2')

endfor


Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by dastew (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
    2014-11-19 pantxo StatusNone Duplicate
        Open/ClosedOpen Closed
    2014-11-19 pantxo Dependencies- Depends on bugs #42033

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code