How can I use sliceomatic for 3D plots without getting the below errors?

2 次查看(过去 30 天)
I have trying to use slicematics for a 3D plot, but I keep getting the error below
here is the code.
sliceomatic(double(D))
here is the error below
Error using matlab.graphics.axis.Axes/set
While setting the 'NextPlot' property of 'Axes':
'new' is not a valid value. Use one of these values: 'add' | 'replace' |
'replacechildren' | 'replaceall'.
Error in sliceomaticfigure (line 162)
set(gca,'nextplot','new');
Error in sliceomatic (line 203)
d = sliceomaticfigure(d);

回答(1 个)

DGM
DGM 2022-6-20
As far as I know, sliceomatic() has been broken for years. As the error says, 'new' is not a valid option for the 'nextplot' property of an axes object. It is in R2009b, but it's not in R2015b. I'm going to assume that this error has existed since R2014b or so, but nailing down the exact change in options would require documentation which no longer exists. Considering when the last update was, I have to assume that the last update was broken in the current version when it was posted.
How can the error be avoided? As far as I know, you either use an older version of MATLAB, or you rewrite sliceomatic() to be compatible with newer versions. The above issue with the 'nextplot' property isn't the only problem. There are multiple comments like this one which attempt to patch the known problems. You'll have to read the comments and debug as necessary. I'm not even sure that any of these recommended edits work, and I'm not sure whether there are new version-dependencies among them.

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

产品


版本

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by