Creating a log probability plot for particle size distribution

11 ビュー (過去 30 日間)
Sam Jones
Sam Jones 2022 年 10 月 4 日
編集済み: Star Strider 2022 年 10 月 4 日
I need to create a plot with the x axis scale shown here.(link) It seems to be similar to the scale used on the y axis of a Weibull plot however I cannot find any resources explaining how to use this scale on the x axis. for context I am doing a particle size distribution from a crystalliser.

採用された回答

Star Strider
Star Strider 2022 年 10 月 4 日
See the Statistics and Machine Learning Toolbox probplot function.
  4 件のコメント
Sam Jones
Sam Jones 2022 年 10 月 4 日
Thanks Star Strider, it seems you are very well versed on this topic. I found another thread you answered previously here. it turns out i wasnt explaining myself clearly and the linked thread is exactly my problem. Do you know a method to make the axis on a normal plot() function mimic that of a probability scale?
Star Strider
Star Strider 2022 年 10 月 4 日
編集済み: Star Strider 2022 年 10 月 4 日
Working on this. I’m having problems getting the x-tick labels to plot correctly. The rest seems to be working. Back later.
EDIT — (4 Oct 2022 at 15:52)
This is as close as I can get, at least for the time being. There is obviously something I’m overlooking with respect to the x-axis scaling, since it’s not as I want it, and that affects how the tails are plotted. (The dashed reference line eludes me, and I am not comfortable with exploring the probplot code to see how it’s calculated.)
x1 = wblrnd(3,3,[500,1]); % Create Data
pd = fitdist(x1,'Weibull'); % Fit Distribution
yc = cdf(pd,x1); % Cumulative Distribution
[ycs,idxs] = sort(yc); % Sort For Plotting
x1s = x1(idxs);
pcv = linspace(1E-3, 100-1E-3, numel(x1)); % Vector Of Percentile Values
pc = prctile(x1,pcv); % Determine Data Percentiles
xaxt = [0.001 0.005 0.01 0.05 0.1 0.25 0.5 0.75 0.95 0.995]; % X-Axis Tick Values
xax = icdf(pd,xaxt(:)); % Corresponding Data Value Extimates, Based On 'pd'
xv = linspace(0, 1, numel(xax)); % Corresponding Axis X-Values
x1v = linspace(0, 1, numel(x1)); % Corresponding Axis X-Values
x1axt = interp1(pcv,pc,xaxt); % Interpolate Axis X-Values To Data X-Values
figure
semilogy(x1v, pc, '+')
% hold on
% plot(xv, xax, '--k')
% hold off
grid
Ax = gca;
set(Ax, 'XTick',xv, 'XTickLabel',xaxt)
Ax.XTickLabelRotation = -90;
xlim([0 1])
xlabel('Probability')
ylabel('Data')
.

サインインしてコメントする。

その他の回答 (1 件)

Paul
Paul 2022 年 10 月 4 日
Using same example data as above ...
x1 = wblrnd(3,3,[500,1]);
figure
probplot('weibull',x1)
grid
set(gca,'XDir','reverse')
view([90 90])
  1 件のコメント
Sam Jones
Sam Jones 2022 年 10 月 4 日
Thanks Paul, any help is much appreciated. I found another thread answered previously here. it turns out i wasnt explaining myself clearly and the linked thread is exactly my problem. Do you know a method to make the axis on a normal plot() function mimic that of a probability scale?

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by