function phat = gumbplot(x)
%GUMBPLOT Plots data on a Gumbel distribution paper.
%
% CALL:  phat = gumbplot(X)
%
% 
%          X = data vector or matrix
%
% Example:
%   R=gumbrnd(2,0,1,100);
%   phat=gumbplot(R)

% Reference: 
%  Johnson  N.L., Kotz S. and Balakrishnan, N. (1994)
%  Continuous Univariate Distributions, Volume 2. Wiley. 


   pr=(0.5:1:(length(x)-0.5))/length(x);
   quant=-evinv(1-pr);
   plot(sort(x),quant,'.'), grid on;
end
