Error using boxchart on matrix data
古いコメントを表示
I am trying to use boxchart() to plot a 3x44 double matrix in Matlab R2020b. Let's call my variable 'Y'. When I call boxchart(Y) I get the following error message:
% Error using boxchart (line 108)
% Data inputs must match the axis configuration. A numeric axis must have numeric data inputs or data inputs which can be converted to double.
Line 108 refers to this:
107 % Configure x-axis and convert xgroupdata to numeric
108 matlab.graphics.internal.configureAxes(cax,xgroupdata,ydata);
I get the same error message if I follow the tutorial here: openExample('graphics/CreateBoxChartsFromMatrixDataExample')
What may be the issue here?
4 件のコメント
Cris LaPierre
2021 年 5 月 6 日
Have you tried restarting MATLAB?
Yngve Bøe
2021 年 5 月 6 日
Thorsten Becker
2021 年 8 月 25 日
i hvae the same issue. I run 2021a
Cris LaPierre
2021 年 8 月 25 日
Please share your code and the complete error message (all the red text)
回答 (1 件)
Roelof du Plessis
2023 年 1 月 16 日
2 投票
First create a new empty figure before running boxchart. A previous figure with a "hold on" can cause this error.
2 件のコメント
Daniel Song
2023 年 10 月 27 日
I had a similiar issue. This fixes it, thanks
Cris LaPierre
2023 年 10 月 27 日
As a best practice, always pair a 'hold on' with a 'hold off'
カテゴリ
ヘルプ センター および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!