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.
|
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.
|
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.
|
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.
|
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?
|
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.
|
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
|
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).
|
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.
|