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

Submitted by:  None
Submitted on:  Mon 27 Oct 2014 11:54:58 AM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: DuplicateAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.2
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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:

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>
Project 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.2i[-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 File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by dastew (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 19 Nov 2014 09:54:31 AM UTCpantxoStatusNone=>Duplicate
      Open/ClosedOpen=>Closed
    Wed 19 Nov 2014 09:53:04 AM UTCpantxoDependencies-=>Depends on bugs #42033

    Back to the top


    Powered by Savane 3.1-cleanup1