How can I plot a Pareto Chart (Y-axis= Qty VS. X-axis = Part Description) for the attached Excel data table?

2 次查看(过去 30 天)
How can I plot a Pareto Chart (Y-axis= Qty VS. X-axis = Part Description) for the attached Excel data table? Thanks in advance. Sarath J
  2 个评论
Sarath J
Sarath J 2018-9-11
编辑:dpb 2018-9-11
I used to create a matrix from the table such as below and plot two columns of my X-Y choice, like Pareto(A(:,3), A(:,2)); This method worked well without text data in the table. For text data in a column wouldn't let me do it using the same way I used to do.
A=[1 30 'ARD';
2 25 'CDE';
3 22 'BTS';
4 10 'RSD';
5 5 'TSE';
6 4 'DMP';
7 3 'MTR';
8 1 'BAC';
9 1 'BAD'];

请先登录,再进行评论。

采纳的回答

dpb
dpb 2018-9-11
A={1 30 'ARD';
2 25 'CDE';
3 22 'BTS';
4 10 'RSD';
5 5 'TSE';
6 4 'DMP';
7 3 'MTR';
8 1 'BAC';
9 1 'BAD'};
t=cell2table(A);
pareto(t.A2,t.A3)
seemed to work just fine. You can't put double numeric data and text together in an "ordinary" array with []; disparate data types must go into a cell array or table.

更多回答(0 个)

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by