bugGNU Octave - Bugs: bug #35985, subplot resets the plot when...

 
 

bug #35985: subplot resets the plot when changing axes position

Submitted by:  Fabio <efferre79>
Submitted on:  Sat 24 Mar 2012 12:28:07 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Documentation
Status: NoneAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.1Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Wed 04 Sep 2013 10:26:15 PM UTC, comment #8:

I ran the script under Matlab R2009b and it does
clear the axis at the last command.

Octave clears it at the line:
subplot (211) % up to here no problem

So, it appears to me that this and #39874
are related. I think that Octave should not
clear the plot at the line:
subplot (211) % up to here no problem

It is less clear whether following Matlab
behavior at the line:
subplot(211) % here the plot is cleared!

is appropriate.

Michael Godfrey <godfrey>
Project Member
Wed 04 Sep 2013 10:05:55 PM UTC, comment #7:

bug #39874 is separate from this bug #35985.

The '874 bug is about switching back and forth between identical subplots. When doing so the axis should not be cleared.

the '985 bug is about switching to a subplot where the axis has been shifted. In this case, a previous reporter has said that Matlab clears the axis.

Here is code that should work on Matlab for verification. It doesn't use a command line function which is Octave-only syntax.

Rik <rik5>
Project Administrator
Wed 04 Sep 2013 08:29:01 PM UTC, comment #6:

I just noticed that bug #39874 is really the
report that addresses the data clearing issue.

I do not really understand this bug report. And,
I could not get the code to work under Matlab.

Michael Godfrey <godfrey>
Project Member
Wed 04 Sep 2013 07:20:28 PM UTC, comment #5:

I just tried a number of subplot() commands in
Matlab. Nothing that I tried, other then clf,
cleared either of the subplots.

This seems to me appropriate behavior.

Even without Matlab compatibility, I think
that it is not appropriate to delete a subplot
unless the user does something explicit to
request that. subplot(2,1,2), for example,
should just make subplot(2,1,2) the current
plot.

If you have a specific sequence that you expect
Matlab to delete a subplot I can try it.

Michael Godfrey <godfrey>
Project Member
Wed 04 Sep 2013 05:08:48 PM UTC, comment #4:

Michael, It doesn't clear the subplot even though the axes have shifted substantially?

Rik <rik5>
Project Administrator
Wed 04 Sep 2013 04:21:56 PM UTC, comment #3:

I tried Matlab R2009B and found that it DOES NOT
clear the selected subplot. This version of Matlab
only creates a new subplot if the subplot() call
refers to a plot which does not yet exist.

So, to be compatible with Matlab, and to be more
user-friendly a change is needed.

Michael Godfrey <godfrey>
Project Member
Thu 14 Jun 2012 09:38:04 PM UTC, comment #2:

Ok, I verified also with Matlab and the behaviour is the same. I'd suggest to put a note into the documentation

Fabio <efferre79>
Sun 03 Jun 2012 02:08:04 AM UTC, comment #1:

Note, the code is designed such that if the old axes are not in exactly the same position and the new one, it will specifically delete the old ones. I could reimplement the function such that it checks within a certain delta in every direction, but otherwise, I would say mark this per-documentation (in the source code, at least).

Anonymous
Sat 24 Mar 2012 12:28:07 PM UTC, original submission:

Here is the code snippet to show the problem:

Basically with the last subplot() command the plot is cleared loosing all the data and axis settings.

Fabio <efferre79>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by efferre79 (Submitted the item)
  •  

    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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 04 Sep 2013 03:31:32 PM UTCrik5Item GroupIncorrect Result=>Documentation
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1