Pareto chart not displaying all inputs (some too small(?))

7 views (last 30 days)
Hi all,
I want to use a pareto chart to illustrate error components of a total error on a measurement. I wrote:
Er_components = [e1^2,e2^2,e3^2,e4^2,e5^2];
Er_cat = {'Precision', 'Load Cell Accuracy', 'Resolution', 'DAQ gain', 'DAQ offset'};
pareto(Er_components,Er_cat);
ylabel('(Total Error)^{2} on Voltage Measurement (mV/V)^{2}');
title('Error Contribution at Low Re');
The only issue is that 3/5 are very small once squared, and the chart wont display the cateogories. I was wondering if there was a way to get it to display the other factors.

Answers (1)

Cris LaPierre
Cris LaPierre on 3 Dec 2020
Edited: Cris LaPierre on 3 Dec 2020
The default behavior is described in the documentation:
"By default, either the tallest 10 bars or first 95% of the cumulative distribution is displayed, whichever is smaller."
The example here shows how to display all values in the cumulative distribution. Below I've modified your example as well (using made up error values).
e1 = 0.0025;
e2 = 0.0374;
e3 = 0.005;
e4 = 0.0255;
e5 = 0.001;
Er_components = [e1^2,e2^2,e3^2,e4^2,e5^2];
Er_cat = {'Precision', 'Load Cell Accuracy', 'Resolution', 'DAQ gain', 'DAQ offset'};
pareto(Er_components,Er_cat,1); % add a third input, ",1" to display all values
ylabel('(Total Error)^{2} on Voltage Measurement (mV/V)^{2}');
title('Error Contribution at Low Re');
  5 Comments
Caitlin Taylor
Caitlin Taylor on 3 Dec 2020
I am using R2019a. I will get an upgrade and see, thanks for your help!
Cris LaPierre
Cris LaPierre on 3 Dec 2020
It appears this functionality was first added in R2020a.

Sign in to comment.

Categories

Find more on Analog Input and Output in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!