Quantile-quantile plot

Quantile-quantile plot with patch option
다운로드 수: 843
업데이트 날짜: 2018/5/5

NOTE: this function is now available from the IoSR Matlab Toolbox as iosr.statistics.qqPlot.
-------------------------
qq_plot(y) displays a quantile-quantile plot of the sample quantiles of y versus theoretical quantiles from a normal distribution. If the distribution of y is normal, the plot will be close to linear.
qq_plot(x,y) displays a quantile-quantile plot of two samples. If the samples come from the same distribution,the plot will be linear.
The inputs x and y should be numeric and have an equal number of elements; every element is treated as a member of the sample.

The plot displays the sample data with the plot symbol 'x'. Superimposed on the plot is a dashed straight line connecting the first and third quartiles.

qq_plot(...,mode) allows the appearance of the plot to be configured. With mode='line' (default), the plot appears as described above. With mode='patch', the data are plotted as a patch object, with the area bound by the x-distribution and the linear fit shaded grey. With mode='both' the two appearances are combined.

qq_plot(...,mode,method) and qq_plot(...,[],method) allows the method for calculating the quartiles, used for the fit line, to be specified. The default is 'R-8'. Type 'help quantile2' for more information. The latter form of the function call uses the default mode.

h = qq_plot(...) returns a two- or three-element vector of handles to the plotted object. The nature of the handles depends upon the mode. In all cases, the first handle is to the sample data, the second handle is to the fit line. With mode='patch' or mode='both', there is third handle to the patch object.

Example

% Display Q-Q plots for the rand and randn functions
figure
subplot(2,1,1)
qq_plot(rand(20),'patch')
subplot(2,1,2)
h = qq_plot(randn(20),'patch');
set(h(3),'FaceColor','r') % change fill colour

인용 양식

Christopher Hummersone (2024). Quantile-quantile plot (https://github.com/IoSR-Surrey/MatlabToolbox), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2012b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Exploration and Visualization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
1.1.1.0

Migrated to GitHub.
Fixed error caused by new Matlab graphics objects.

1.1.0.0

Added 'method' input for consistency with other functions.

1.0.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.