Error in matlab.gra​phics.char​t.StackedL​ineChart/g​et.AxesPro​perties

2 次查看(过去 30 天)
I want to specify Y limits for every plots in the stackedplot graph using the script below, as well as modify the x axes format. I was following the procedures in here https://uk.mathworks.com/help/matlab/ref/matlab.graphics.chart.internal.stackedplot.stackedaxesproperties-properties.html but none worked.
nearfield = [21418 21413 21419 21416 21415];
new = {};
for i=1:length(nearfield)
newYlabels = {nearfield(i)};
new = [new newYlabels];
end
figure
s=stackedplot(tm(1:halfdat),urutan(3:halfdat+2,1:5),...
'DisplayLabels',new);
s.LineWidth=1;
c = s.AxesProperties(3).YLimits
so far only the last line that didn't work. Anyone knows what happened and how to solve this? Thanks
  8 个评论
Walter Roberson
Walter Roberson 2020-8-16
If you comment out the xlabel() do you get the same problem?
Which release are you using?
ahamahoru
ahamahoru 2020-8-16
Apologies, it worked after I restarted my laptop and run the script again. I am using r2019b, I don't know what happened but it's solved. Thanks for your help!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by