This occurs even if I declare a vector/matrix instead of a timetable.
Am I seeing a bug In LiveScript Output?
4 ビュー (過去 30 日間)
古いコメントを表示
I get an extra set of incorrect axes when viewing a stackedplot figure in the LiveScript output.
I added variable names so that the correct set of axes are moved and you can see the two sets.
tbl=timetable([0;1],[1;1],[0;0],[1;0],'SampleRate',0.5);
tbl.Properties.VariableNames={'A somewhat longer name','shorter','short','shortest'};
stackedplot(tbl)
Results in the ouput of the LiveScript:
Results from using the command window:
Is this a bug or do I have some setting or option improperly set?
採用された回答
Cris LaPierre
2020 年 10 月 26 日
When I run your code in my computer, the resulting figure looks the same in a live script and the command window. I can also run it here using 20b.
tbl=timetable([0;1],[1;1],[0;0],[1;0],'SampleRate',0.5);
tbl.Properties.VariableNames={'A somewhat longer name','shorter','short','shortest'};
stackedplot(tbl)
5 件のコメント
Cris LaPierre
2020 年 10 月 26 日
It might depend what else you have in your live script. If you had another figure before, it will reuse the same axes, which could cause the problem. Using the figure command forces it to create a brand new figure for the plot, preventing any carry-over issues that might result from reusing an existing figure.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Graphics Object Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!