Getting plotted x and y points from probplot
6 views (last 30 days)
Show older comments
I am making a probplot of some data and would like to find the x-value corresponding to a given probability, e.g. prob>0.99 what is the corresponding value on the x axis.
Taking the output of a probplot function call
ax = probplot(data, [], [], 'noref'); one would think the datat would be in ax.XData and ax.YData but this is very misaligned with respect to what is plotted, e.g. y data not going from 0 to 1. Is there a way to extract the transformed data?
0 Comments
Answers (1)
Alan Moses
on 29 Jun 2021
ax = probplot(data) returns a graphics array. The ‘x’ and ‘y’ data can be accessed by the following lines:
ax(1).XData %returns the x data
ax(1).YData %returns the y data
The ‘y’ data represents the quantiles of the distribution. By default, the normal distribution is considered. The quantiles are converted into probability values. In case of uncensored data, the probability values can be found using the formula (i-0.5)/N, where N is the number of data points and ‘i’ runs from 1 to N.
You may refer to the “Algorithms” section in the documentation that explains the same. You may also refer to the post here.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!