({{, (RefLink[QuantilePlot, paclet:ref/QuantilePlot])[list]
generates a plot of quantiles of list against the quantiles of a normal distribution.}, {, (RefLink[QuantilePlot, paclet:ref/QuantilePlot])[dist]
generates a plot of quantiles of the distribution dist against the quantiles of a normal distribution.}, {, (RefLink[QuantilePlot, paclet:ref/QuantilePlot])[data,rdata] 
generates a plot of the quantiles of data against the quantiles of rdata.}, {, (RefLink[QuantilePlot, paclet:ref/QuantilePlot])[data,rdist]
generates a plot of the quantiles of data against the quantiles of a symbolic distribution rdist.}, {, (RefLink[QuantilePlot, paclet:ref/QuantilePlot])[{(Subscript[data, 1]),(Subscript[data, 2]),…},ref]
generates a plot of quantiles of (Subscript[data, i]) against the quantiles of a reference distribution ref.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[QuantilePlot, paclet:ref/QuantilePlot])[(Subscript[data, 1]),(Subscript[data, 2])] works with (Subscript[data, i]) being either a dataset of real values or a symbolic univariate distribution.

Data for (RefLink[QuantilePlot, paclet:ref/QuantilePlot]) can be given in the following forms:

For datasets list empirical quantiles are used, and for symbolic distributions dist exact quantiles are used.

(RefLink[QuantilePlot, paclet:ref/QuantilePlot])[data,dist[(Subscript[θ, 1]),…]] with symbolic parameters (Subscript[θ, i]) is equivalent to (RefLink[QuantilePlot, paclet:ref/QuantilePlot])[data,(RefLink[EstimatedDistribution, paclet:ref/EstimatedDistribution])[data,dist[(Subscript[θ, 1]),…]]].

The form w[data] or w[dist] provides a wrapper w to be applied to the resulting graphics primitives.

The following wrappers can be used:

(RefLink[QuantilePlot, paclet:ref/QuantilePlot]) has the same options as (RefLink[Graphics, paclet:ref/Graphics]), with the following additions and changes:

With (RefLink[Filling, paclet:ref/Filling])->(RefLink[Automatic, paclet:ref/Automatic]), the region between a dataset and reference line will be filled. By default, "stems" are used for datasets and "solid" filling is used for symbolic distributions. The setting (RefLink[Joined, paclet:ref/Joined])->(RefLink[True, paclet:ref/True]) will force "solid" filling for datasets.

The arguments supplied to functions in (RefLink[MeshFunctions, paclet:ref/MeshFunctions]) and (RefLink[RegionFunction, paclet:ref/RegionFunction]) are x, y. Functions in (RefLink[ColorFunction, paclet:ref/ColorFunction]) are by default supplied with scaled versions of these arguments.

The setting (RefLink[Joined, paclet:ref/Joined])->(RefLink[Automatic, paclet:ref/Automatic]) is equivalent to (RefLink[Joined, paclet:ref/Joined])->True when comparing two distributions, and (RefLink[Joined, paclet:ref/Joined])->(RefLink[False, paclet:ref/False]) otherwise.

The setting (RefLink[PlotStyle, paclet:ref/PlotStyle])->(RefLink[Automatic, paclet:ref/Automatic]) uses a sequence of different plot styles for different lines.

With the (RefLink[ReferenceLineStyle, paclet:ref/ReferenceLineStyle])->(RefLink[None, paclet:ref/None]), no reference line will be drawn.

Typical settings for (RefLink[PlotLegends, paclet:ref/PlotLegends]) include:

With (RefLink[ScalingFunctions, paclet:ref/ScalingFunctions])->{(Subscript[s, x]),(Subscript[s, y])}, the x coordinate is scaled using (Subscript[s, x]) and the y coordinate is scaled using (Subscript[s, y]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (116)

OpenersExampleSection0(Spacer1)Basic Examples  (5)

Compare data to a normal distribution:

data=RandomVariate[UniformDistribution[{0,1}],100];

QuantilePlot[data]

Compare data to a specific distribution:

data=RandomVariate[UniformDistribution[{0,1}],100];

QuantilePlot[data,UniformDistribution[{0,1}]]

Compare data to an estimated distribution:

data=RandomVariate[StudentTDistribution[4,2,3],200];
QuantilePlot[data,StudentTDistribution[μ,σ,ν]]

EstimatedDistribution[data,StudentTDistribution[μ,σ,ν]]

Compare two datasets:

data1=RandomVariate[NormalDistribution[2,3],100];
data2=RandomVariate[StudentTDistribution[4,2,3],200];

QuantilePlot[data1,data2]

Compare several datasets and include a legend:

data1=RandomVariate[NormalDistribution[2,3],100];
data2=RandomVariate[StudentTDistribution[4,2,3],200];

QuantilePlot[{data1,data2},PlotLegends->{"normal","Student t"}]

OpenersExampleSection1(Spacer1)Scope  (22)

OpenersExampleSubsection0(Spacer1)Data and Distributions  (11)

(RefLink[QuantilePlot, paclet:ref/QuantilePlot]) works with numeric data:

QuantilePlot[RandomVariate[UniformDistribution[{0,1}],100]]

(RefLink[QuantilePlot, paclet:ref/QuantilePlot]) works with symbolic distributions:

QuantilePlot[UniformDistribution[{0,1}]]

Use multiple datasets and distributions:

QuantilePlot[{RandomVariate[NormalDistribution[],100],RandomVariate[PoissonDistribution[1],50],WeibullDistribution[2,2]}]

The default reference distribution is the closest estimated (RefLink[NormalDistribution, paclet:ref/NormalDistribution]):

data = RandomVariate[UniformDistribution[{0,1}],100];
ref = EstimatedDistribution[data,NormalDistribution[a,b]];

{QuantilePlot[data],QuantilePlot[data,ref]}

Specify data or distributions as the reference:

data= RandomVariate[UniformDistribution[{0,1}],100];

{QuantilePlot[data,RandomVariate[NormalDistribution[0,1],100]], QuantilePlot[data, NormalDistribution[0,1]]}

Reference distributions are estimated for each dataset:

data = RandomVariate[UniformDistribution[{0,1}],100];

QuantilePlot[{data,2+data^2},PlotRange->All]

Estimate specific reference distributions for numeric datasets:

QuantilePlot[RandomVariate[UniformDistribution[{0,1}],100], WeibullDistribution[a,b,c]]

Use all forms of built-in distributions:

data=RandomVariate[UniformDistribution[{0,1}],100];

Parametric:

QuantilePlot[data,WeibullDistribution[2,5]]

Nonparametric:

QuantilePlot[data,SmoothKernelDistribution[data]]

Derived:

QuantilePlot[data,TruncatedDistribution[{2,4},ExponentialDistribution[1]]]

Use all forms of data.

Numeric values in an association are used as the y coordinates:

QuantilePlot[<|"a"->2,"b"->3,"c"->5,"d"->7,"e"->11,"f"->13|>]

Numeric keys and values in an association are used as the x and y coordinates:

QuantilePlot[<|2->1,3->2,5->3,7->4,11->5,13->6|>]

Plot time series directly:

data=CountryData["UnitedStates",{{"Population"},{1988,2013}}]

QuantilePlot[data,AxesLabel->Automatic]

The weights in (RefLink[WeightedData, paclet:ref/WeightedData]) are ignored:

QuantilePlot[WeightedData[{2,3,5,7,11,13,17,19,23,29},{1,2,3,4,5,6,7,8,9,10}]]

OpenersExampleSubsection1(Spacer1)Presentation  (11)

Multiple datasets are automatically colored to be distinct:

data={RandomVariate[NormalDistribution[],100],RandomVariate[WeibullDistribution[1,2],100]};

QuantilePlot[data]

Provide explicit styling to different sets:

data={RandomVariate[NormalDistribution[],100],RandomVariate[WeibullDistribution[1,2],100]};

QuantilePlot[data,PlotStyle->{Blue,Red}]

Include legends for each dataset:

data={RandomVariate[NormalDistribution[],100],RandomVariate[WeibullDistribution[1,2],100]};

QuantilePlot[data,PlotLegends->{"one","two"}]

Add labels:

QuantilePlot[RandomVariate[UniformDistribution[{0,1}],100],FrameLabel->{"Theoretical Quantiles","Empirical Quantiles"},PlotLabel->"Q-Q Plot",PlotStyle->Directive[PointSize[Medium],Purple]]

Use specific styles for the reference line:

QuantilePlot[Range[100],ReferenceLineStyle->Directive[Dashing[{}],Red]]

Turn off the reference line:

QuantilePlot[Range[100],ReferenceLineStyle->None]

Provide an interactive (RefLink[Tooltip, paclet:ref/Tooltip]) for the data:

QuantilePlot[Tooltip[RandomVariate[UniformDistribution[{0,1}],100]],PlotStyle->Directive[PointSize[Medium],Orange]]

Provide a specific tooltip for the data:

data = RandomVariate[UniformDistribution[{0,1}],100];

QuantilePlot[Tooltip[data,BoxWhiskerChart[data]],PlotStyle->Directive[PointSize[Medium],Magenta]]

Create filled plots:

data1=RandomReal[NormalDistribution[100,400],200];
data2 =RandomReal[UniformDistribution[{5,400}],500];

QuantilePlot[{data1,data2},Filling->{1->{2}},FillingStyle->{Red,Blue}]

Use shapes to distinguish different datasets:

QuantilePlot[{{1,2,3,5,8},{2,3,6,9,10},{4,5,7,10,12}},PlotMarkers->Automatic]

Use (RefLink[Joined, paclet:ref/Joined]) to connect datasets with lines:

QuantilePlot[{1,2,4,7,3,5,8,10,9},Joined->True,PlotStyle->Orange]

Use a plot theme:

data = RandomVariate[UniformDistribution[{0,1}],100];

QuantilePlot[data,PlotTheme->"Marketing"]

OpenersExampleSection2(Spacer1)Options  (75)

OpenersExampleSubsection2(Spacer1)AspectRatio  (1)

Choose the ratio of height to width from the actual plot values:

QuantilePlot[Range[0,1,0.025],AspectRatio->Automatic]

OpenersExampleSubsection3(Spacer1)Axes  (1)

Draw axes instead of a frame:

QuantilePlot[Range[0,1,0.025],Axes->True,Frame->False]

OpenersExampleSubsection4(Spacer1)AxesLabel  (1)

Use labels based on variables specified:

QuantilePlot[Range[0,1,0.025],AxesLabel->{"Theoretical Quantiles","Empirical Quantiles"},Axes->True,Frame->False]

OpenersExampleSubsection5(Spacer1)ClippingStyle  (4)

Omit clipped regions of the plot:

QuantilePlot[LogNormalDistribution[0,1],ClippingStyle->None]

Show the clipped regions like the rest of the curve:

QuantilePlot[LogNormalDistribution[0,1],ClippingStyle->Automatic,PlotStyle->Thick]

Show the clipped regions with red lines:

QuantilePlot[LogNormalDistribution[0,1],ClippingStyle->Red]

Show the clipped regions as red and thick:

QuantilePlot[LogNormalDistribution[0,1],PlotRange->{{-2,4},{-2,4}},ClippingStyle->Directive[Red,Thick]]

OpenersExampleSubsection6(Spacer1)ColorFunction  (6)

(RefLink[ColorFunction, paclet:ref/ColorFunction]) requires at least one dataset to be (RefLink[Joined, paclet:ref/Joined]):

{QuantilePlot[RandomVariate[NormalDistribution[],100],ColorFunction->"Rainbow"],QuantilePlot[RandomVariate[NormalDistribution[],100],ColorFunction->"Rainbow",Joined->True]}

Color by scaled x and y coordinates:

Table[QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,ColorFunction->Function[{x,y},f],PlotLabel->f,PlotStyle->Thick],{f,{Hue[x],Hue[y]}}]

Color with a named color scheme:

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,ColorFunction->"DarkRainbow"]

Fill to the reference line with the color used for the curve:

QuantilePlot[RandomVariate[NormalDistribution[1,2],100],Joined->True,ColorFunction->Function[{x,y},Hue[x]],Filling->Automatic]

(RefLink[ColorFunction, paclet:ref/ColorFunction]) has higher priority than (RefLink[PlotStyle, paclet:ref/PlotStyle]) for coloring the curve:

QuantilePlot[RandomVariate[NormalDistribution[1,2],100],Joined->True,ColorFunction->"DarkRainbow",PlotStyle->Directive[Red,Thick]]

Use (RefLink[Automatic, paclet:ref/Automatic]) in (RefLink[MeshShading, paclet:ref/MeshShading]) to use (RefLink[ColorFunction, paclet:ref/ColorFunction]):

QuantilePlot[RandomVariate[NormalDistribution[1,2],100],Joined->True,ColorFunction->"Rainbow",PlotStyle->Directive[Red,Thick],Mesh->9,MeshShading->{Automatic,Black},MeshStyle->None]

OpenersExampleSubsection7(Spacer1)ColorFunctionScaling  (2)

Color the line based on scaled y value:

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,ColorFunction->Function[{x,y},Hue[y]],PlotStyle->Thick, ColorFunctionScaling->True]

Color the line based on unscaled y value:

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,ColorFunction->Function[{x,y},Hue[y]],PlotStyle->Thick, ColorFunctionScaling->False]

OpenersExampleSubsection8(Spacer1)Filling  (7)

Fill from data to the reference line:

QuantilePlot[RandomVariate[ParetoDistribution[1,2],50],Filling->Automatic]

Use symbolic or explicit values for filling:

Table[QuantilePlot[RandomVariate[ParetoDistribution[1,2],50],Filling->c,PlotLabel->c],{c,{Top,Bottom,Axis,3}}]

Points fill with stems:

QuantilePlot[RandomVariate[ParetoDistribution[1,2],50],Filling->Automatic]

Curves fill with solid regions:

QuantilePlot[RandomVariate[ParetoDistribution[1,2],50],Filling->Automatic,Joined->True]

Fill from the third dataset to the axis:

QuantilePlot[{RandomVariate[NormalDistribution[],14],RandomVariate[PoissonDistribution[1],10],WeibullDistribution[2,2]},Filling->{3->Axis}]

Fill between datasets using a particular style:

QuantilePlot[{RandomVariate[WeibullDistribution[1,2],100],RandomVariate[WeibullDistribution[2,4],100]},Joined->True,Filling->{1->{{2},Directive[Orange,Dashed]}}]

Use different styles above and below the filling level:

QuantilePlot[{RandomVariate[WeibullDistribution[1,2],100],RandomVariate[WeibullDistribution[2,4],100]},Joined->True,Filling->{1->{{2},{Yellow,Red}}}]

Filling only applies where the datasets overlap:

QuantilePlot[{RandomVariate[ParetoDistribution[1,6],100],RandomVariate[ParetoDistribution[1,10],100]},Joined->True,Filling->{1->{{2},Red}}]

OpenersExampleSubsection9(Spacer1)FillingStyle  (3)

Use different fill colors:

Table[QuantilePlot[ParetoDistribution[1,10],Filling->Automatic,FillingStyle->c],{c,{Red,Green,Blue,Yellow}}]

Fill with transparent orange regions:

QuantilePlot[Table[ParetoDistribution[x,4],{x,1,2,1}],Filling->Bottom,FillingStyle->Directive[Opacity[0.5],Orange]]

Use blue above the fill level and red below:

QuantilePlot[Range[0,1,0.025],Filling->Automatic,FillingStyle->{Red,Blue}]

OpenersExampleSubsection10(Spacer1)Joined  (2)

Datasets are not joined by default:

QuantilePlot[RandomVariate[NormalDistribution[],100]]

Join the points:

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True]

Symbolic distributions are joined by default:

QuantilePlot[LogNormalDistribution[0,1]]

OpenersExampleSubsection11(Spacer1)Mesh  (4)

Use 20 mesh levels evenly spaced in the x direction:

QuantilePlot[WeibullDistribution[1,2],NormalDistribution[],Mesh->20]

Use the mesh to divide the curve into deciles:

data=RandomVariate[UniformDistribution[{1,10}],100];QuantilePlot[data,Joined->True,MeshFunctions->{#2&},Mesh->{Quantile[data,Range[0.1,0.9,0.1]]}]

Use an explicit list of values for the mesh in the x direction:

data=RandomVariate[UniformDistribution[{1,10}],100];QuantilePlot[data,Joined->True,Mesh->{Range[0,12,2]},MeshStyle->PointSize[Medium]]

Specify (RefLink[Style, paclet:ref/Style]) and mesh levels in the x direction:

data=RandomVariate[UniformDistribution[{1,10}],100];QuantilePlot[data,Joined->True,Mesh->{Table[{x,Hue[x/(2)]},{x,0.,12,.5}]}]

OpenersExampleSubsection12(Spacer1)MeshFunctions  (2)

Use a mesh evenly spaced in the x and y directions:

Table[QuantilePlot[ParetoDistribution[1,10],MeshFunctions->{Function[{x,y},Evaluate[f]]},Mesh->9,PlotLabel->f],{f,{x,y}}]

Show five mesh levels in the x direction (red) and 10 in the y direction (blue):

QuantilePlot[ParetoDistribution[1,10],Mesh->{5,10},MeshFunctions->{#1&,#2&},MeshStyle->{Directive[PointSize[Medium],Red],Blue}]

OpenersExampleSubsection13(Spacer1)MeshShading  (6)

Alternate red and blue segments of equal width in the x direction:

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,Mesh->10,MeshShading->{Red,Blue}]

Use (RefLink[None, paclet:ref/None]) to remove segments:

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,Mesh->10,MeshShading->{Red,None}]

(RefLink[MeshShading, paclet:ref/MeshShading]) can be used with (RefLink[PlotStyle, paclet:ref/PlotStyle]):

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,Mesh->10,PlotStyle->Thick,MeshFunctions->{#1&},MeshShading->{Red,Blue}]

(RefLink[MeshShading, paclet:ref/MeshShading]) has higher priority than (RefLink[PlotStyle, paclet:ref/PlotStyle]) for styling the curve:

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,Mesh->10,PlotStyle->Black,MeshFunctions->{#1&},MeshShading->{Red,Blue}]

Use (RefLink[PlotStyle, paclet:ref/PlotStyle]) for some segments by setting (RefLink[MeshShading, paclet:ref/MeshShading]) to (RefLink[Automatic, paclet:ref/Automatic]):

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,Mesh->10,PlotStyle->Directive[Thick,Yellow],MeshFunctions->{#1&},MeshShading->{Red,Automatic}]

(RefLink[MeshShading, paclet:ref/MeshShading]) can be used with (RefLink[ColorFunction, paclet:ref/ColorFunction]):

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,Mesh->10,PlotStyle->Thick,MeshFunctions->{#1&},MeshShading->{Black,Automatic},
ColorFunction->Function[{x,y},Hue[x]]]

OpenersExampleSubsection14(Spacer1)MeshStyle  (4)

Color the mesh the same color as the plot:

QuantilePlot[RandomVariate[NormalDistribution[],100],RandomVariate[NormalDistribution[],200],Joined->True,Mesh->9,MeshStyle->Automatic]

Use a red mesh in the x direction:

QuantilePlot[RandomVariate[NormalDistribution[],100],RandomVariate[NormalDistribution[],200],Joined->True,Mesh->9,MeshStyle->Red]

Use a red mesh in the x direction and a blue mesh in the y direction:

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,Mesh->9,MeshStyle->{Red,Blue},MeshFunctions->{#1&,#2&}]

Use big red mesh points in the x direction:

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,Mesh->10,MeshStyle->Directive[PointSize[Large],Red]]

OpenersExampleSubsection15(Spacer1)Method  (4)

By default, the reference line is drawn through the first and third quartiles of data:

QuantilePlot[RandomVariate[UniformDistribution[{0,1}],100]]

Draw the best-fit line through data:

QuantilePlot[RandomVariate[UniformDistribution[{0,1}],100],Method->{"ReferenceLineMethod"->"Fit"}]

The reference line represents the reference distribution:

QuantilePlot[RandomVariate[UniformDistribution[{0,1}],100],Method->{"ReferenceLineMethod"->"Reference"}]

Draw a diagonal reference line:

QuantilePlot[RandomVariate[NormalDistribution[],100],Method->{"ReferenceLineMethod"->"Diagonal"},AspectRatio->1,PlotRange->{{-1,1},{-1,1}}]

OpenersExampleSubsection16(Spacer1)PlotLegends  (7)

By default, no legends are used:

QuantilePlot[{Sqrt[Range[40]],Log[Range[40]]}]

Generate a legend using labels:

QuantilePlot[{Sqrt[Range[40]],Log[Range[40]]},PlotLegends->{"sqrt","log"}]

Generate a legend using placeholders:

QuantilePlot[{Sqrt[Range[40]],Log[Range[40]]},PlotLegends->"Placeholders"]

Legends use the same styles as the plot:

QuantilePlot[{Sqrt[Range[40]],Log[Range[40]]},PlotStyle->{Red,Blue},PlotLegends->{"sqrt","log"}]

Use (RefLink[Placed, paclet:ref/Placed]) to specify the legend placement:

QuantilePlot[{Sqrt[Range[40]],Log[Range[40]]},PlotLegends->Placed[{"sqrt","log"},Below]]

Place the legend inside the plot:

QuantilePlot[{Sqrt[Range[40]],Log[Range[40]]},PlotLegends->Placed[{"sqrt","log"},{0.75,0.25}]]

Use (RefLink[LineLegend, paclet:ref/LineLegend]) to change the legend appearance:

QuantilePlot[{Sqrt[Range[40]],Log[Range[40]]},PlotLegends->LineLegend[{"sqrt","log"},LegendFunction->Frame,LegendMarkers->None]]

OpenersExampleSubsection17(Spacer1)PlotMarkers  (7)

(RefLink[QuantilePlot, paclet:ref/QuantilePlot]) normally uses distinct colors to distinguish different sets of data:

data=Table[RandomVariate[ParetoDistribution[p[[1]],p[[2]]],20],{p,{{1,2},{4,9},{5,7},{7,9}}}];

QuantilePlot[data,PlotMarkers->None]

Use colors and shapes to distinguish sets of data:

data=Table[RandomVariate[ParetoDistribution[p[[1]],p[[2]]],20],{p,{{1,2},{4,9},{5,7},{7,9}}}];

QuantilePlot[data,PlotMarkers->Automatic]

Use shapes only:

data=Table[RandomVariate[ParetoDistribution[p[[1]],p[[2]]],20],{p,{{1,2},{4,9},{5,7},{7,9}}}];

QuantilePlot[data,PlotMarkers->Automatic,PlotStyle->Black]

Change the size of the default plot markers:

data=Table[RandomVariate[ParetoDistribution[p[[1]],p[[2]]],20],{p,{{1,2},{4,9},{5,7},{7,9}}}];

Table[QuantilePlot[data,PlotMarkers->{Automatic,s}],{s,{Tiny,Small,Medium,Large}}]

Use arbitrary text for plot markers:

data=Table[RandomVariate[ParetoDistribution[p[[1]],p[[2]]],20],{p,{{1,2},{4,9},{5,7},{7,9}}}];

QuantilePlot[data,PlotMarkers->{"1","2","3","4"}]

Use explicit graphics for plot markers:

data=Table[RandomVariate[ParetoDistribution[p[[1]],p[[2]]],20],{p,{{1,2},{4,9},{5,7},{7,9}}}];

QuantilePlot[data,PlotMarkers->{,,,}]

Use the same symbol for all the sets of data:

data=Table[RandomVariate[ParetoDistribution[p[[1]],p[[2]]],20],{p,{{1,2},{4,9},{5,7},{7,9}}}];

QuantilePlot[data,PlotMarkers->{"○"}]

OpenersExampleSubsection18(Spacer1)PlotRange  (3)

(RefLink[PlotRange, paclet:ref/PlotRange]) is automatically calculated:

QuantilePlot[RandomVariate[LogNormalDistribution[2,6],100]]

Show the whole dataset:

QuantilePlot[RandomVariate[LogNormalDistribution[2,6],100],PlotRange->All]

Show the distribution for x between 1 and 2 and y between -1 and 3:

QuantilePlot[RandomVariate[NormalDistribution[],100],PlotRange->{{1,2},{-1,3}}]

OpenersExampleSubsection19(Spacer1)PlotStyle  (3)

Use different style directives:

Table[QuantilePlot[ParetoDistribution[1,10],PlotStyle->ps],{ps,{Red,Thick,Dashed,Directive[Red,Thick]}}]

By default, different styles are chosen for multiple curves:

QuantilePlot[Table[ParetoDistribution[x,10],{x,1,4,1}]]

Explicitly specify the style for different curves:

QuantilePlot[Table[ParetoDistribution[x,10],{x,1,4,1}],PlotStyle->{Red,Green, Blue,Brown}]

OpenersExampleSubsection20(Spacer1)PlotTheme  (2)

Use a theme with simple ticks and grid lines in a high contrast color scheme:

QuantilePlot[RandomVariate[NormalDistribution[],100],PlotTheme->"Business",Joined->True]

Change the color scheme:

QuantilePlot[RandomVariate[NormalDistribution[],100],Joined->True,PlotTheme->"Business",PlotStyle->60]

OpenersExampleSubsection21(Spacer1)ReferenceLineStyle  (4)

(RefLink[ReferenceLineStyle, paclet:ref/ReferenceLineStyle]) by default uses a (RefLink[Dotted, paclet:ref/Dotted]) form of (RefLink[PlotStyle, paclet:ref/PlotStyle]):

QuantilePlot[WeibullDistribution[2,4]]

Draw a red dotted reference line:

QuantilePlot[WeibullDistribution[2,4],ReferenceLineStyle->Red]

Draw a solid red reference line:

QuantilePlot[WeibullDistribution[2,4],ReferenceLineStyle->Directive[Red,Dashing[0]]]

Use (RefLink[None, paclet:ref/None]) to turn off the reference line:

QuantilePlot[WeibullDistribution[2,4],ReferenceLineStyle->None]

(RefLink[ReferenceLineStyle, paclet:ref/ReferenceLineStyle]) can be combined with (RefLink[PlotStyle, paclet:ref/PlotStyle]):

QuantilePlot[WeibullDistribution[2,4],ReferenceLineStyle->Thick]

OpenersExampleSubsection22(Spacer1)ScalingFunctions  (2)

Data is normally shown on linear scales:

QuantilePlot[RandomVariate[ExponentialDistribution[4],100]]

Plot the data on a log-scaled y axis:

QuantilePlot[RandomVariate[ExponentialDistribution[4],100],ScalingFunctions->{None,"Log"}]

OpenersExampleSection3(Spacer1)Applications  (5)

Visually test whether data was drawn from a particular distribution:

data=RandomVariate[NormalDistribution[],1000];

Linearity occurs when the data was drawn from the reference distribution:

QuantilePlot[data,NormalDistribution[]]

Deviations from linearity occur when the data was not drawn from the reference distribution:

QuantilePlot[data,ParetoDistribution[1,2]]

The residuals resulting from a (RefLink[LinearModelFit, paclet:ref/LinearModelFit]) should be normally distributed. Here, some data is simulated with normal and exponential noise of equal variance:

xdat=RandomVariate[UniformDistribution[{0,100}],100];
ydat=Table[2x+3,{x,xdat}];

exp=ydat+RandomVariate[ExponentialDistribution[1/50],100];
norm=ydat+RandomVariate[NormalDistribution[0,50],100];

Fit linear models to the simulated data:

lmExp=LinearModelFit[Transpose[{xdat,exp}],x,x];
lmNorm=LinearModelFit[Transpose[{xdat,norm}],x,x];

{Show[ListPlot[Transpose[{xdat,exp}],PlotLabel->"Exponential",AxesOrigin->{0,-100}],Plot[lmExp[x],{x,0,100}]],Show[ListPlot[Transpose[{xdat,norm}],PlotLabel->"Normal",AxesOrigin->{0,-100}],Plot[lmNorm[x],{x,0,100}]]}

There is strong visual evidence that the residuals are not normal in the first model:

{QuantilePlot[lmExp["FitResiduals"]],QuantilePlot[lmNorm["FitResiduals"]]}

(RefLink[DistributionFitTest, paclet:ref/DistributionFitTest]) can be used to make a quantitative statement about normality:

DistributionFitTest[lmExp["FitResiduals"]]

DistributionFitTest[lmNorm["FitResiduals"]]

The heights of singers from the New York Choral Society were recorded along with the voice part of each singer. Voice parts, in increasing order of pitch, include bass, tenor, alto, and soprano:

data=SplitBy[ExampleData[{"Statistics","SingerHeights"}],Last];

The mean heights for each voice part:

Reverse/@(Mean/@data)//N//TableForm

Plotting the height quantiles of Soprano 1 against the other voice parts suggests that there is an additive shift in height with a voice part:

Table[Show[QuantilePlot[i[[All,1]],data[[1,All,1]],PlotRange->{{58,78},{58,78}},PlotLabel->i[[1,2]],ReferenceLineStyle->None,AspectRatio->1,PlotStyle->Black],Graphics[{Black,Line[{{58,58},{78,78}}]}]],{i,data}]

Rainfall, in acre-feet, was recorded from 52 clouds, of which 26 were chosen randomly and seeded with silver oxide:

rcc=Select[ExampleData[{"Statistics","RainfallSeeding"}],#1[[2]]==="Control"&][[All,1]];

rsc=Select[ExampleData[{"Statistics","RainfallSeeding"}],#1[[2]]==="Seeded"&][[All,1]];

Clearly, the seeded clouds produce more rain than the control:

QuantilePlot[rsc,rcc,PlotMarkers->"*",PlotStyle->Black,Method->{"ReferenceLineMethod"->"Diagonal"}]

A log-log scaled plot suggests that the increase is about one order of magnitude:

Show[QuantilePlot[rsc,rcc,PlotMarkers->"*",PlotStyle->Black,ReferenceLineStyle->None,ScalingFunctions->{"Log","Log"},PlotRangePadding->0],Graphics[Line[{{0,0},{8,8}}]],Graphics[{Dashed,Line[{{0,1},{8,9}}]}]]

Compare two time slices for a random process:

data1=RandomVariate[WienerProcess[0,2][1],10^3];
data2=RandomVariate[WienerProcess[0,2][15],10^3];

QuantilePlot[data1,data2]

OpenersExampleSection4(Spacer1)Properties & Relations  (9)

With no second argument, data is compared against an estimated normal distribution:

data=RandomVariate[NormalDistribution[1,2],10^3];

{QuantilePlot[data],QuantilePlot[data,NormalDistribution[μ,σ]]}

Comparing with (RefLink[UniformDistribution, paclet:ref/UniformDistribution])[{0,1}] is equivalent to plotting the quantile:

data=RandomVariate[ExponentialDistribution[2],10^3];

{QuantilePlot[data,UniformDistribution[{0,1}]],Plot[Quantile[data,q],{q,0,1}]}

(RefLink[ProbabilityPlot, paclet:ref/ProbabilityPlot]) compares CDF values for the data.

data=RandomVariate[NormalDistribution[1,2],10^3];

ProbabilityPlot[data]

(RefLink[ProbabilityScalePlot, paclet:ref/ProbabilityScalePlot]) scales the axes so that points from distributions are on a straight line:

data=RandomVariate[NormalDistribution[1,2],10^3];

ProbabilityScalePlot[data,"Normal"]

(RefLink[BoxWhiskerChart, paclet:ref/BoxWhiskerChart]) and (RefLink[DistributionChart, paclet:ref/DistributionChart]) can be used to visualize the distribution of data:

data=RandomVariate[ExponentialDistribution[2],10^3];

{BoxWhiskerChart[data], DistributionChart[data]}

(RefLink[SmoothHistogram, paclet:ref/SmoothHistogram]) and (RefLink[Histogram, paclet:ref/Histogram]) can be used to visualize the distribution of data:

data=RandomVariate[ExponentialDistribution[2],10^3];

{SmoothHistogram[data], Histogram[data]}

(RefLink[DiscretePlot, paclet:ref/DiscretePlot]) can be used to visualize the discrete distributions:

{QuantilePlot[PoissonDistribution[3]],DiscretePlot[PDF[PoissonDistribution[3],x],{x,0,6},PlotStyle->PointSize[Medium]]}

Use (RefLink[ListPlot, paclet:ref/ListPlot]) to see the data:

data = FindClusters[RandomVariate[ExponentialDistribution[1],100]];

ListPlot[data]

(RefLink[QuantilePlot, paclet:ref/QuantilePlot]) ignores time stamps when input is a (RefLink[TimeSeries, paclet:ref/TimeSeries]):

ts=TimeSeries[];

{QuantilePlot[ts],QuantilePlot[ts["Values"]]}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ProbabilityPlot, paclet:ref/ProbabilityPlot])  ▪  (RefLink[Quantile, paclet:ref/Quantile])  ▪  (RefLink[Histogram, paclet:ref/Histogram])  ▪  (RefLink[BoxWhiskerChart, paclet:ref/BoxWhiskerChart])  ▪  (RefLink[DistributionChart, paclet:ref/DistributionChart])  ▪  (RefLink[ListPlot, paclet:ref/ListPlot])  ▪  (RefLink[DiscretePlot, paclet:ref/DiscretePlot])  ▪  (RefLink[Plot, paclet:ref/Plot])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Statistical Visualization, paclet:guide/StatisticalVisualization])}, {▪(RefLinkPlain[Random Variables, paclet:guide/RandomVariables])}, {▪(RefLinkPlain[Statistical Data Analysis, paclet:guide/Statistics])}, {▪(RefLinkPlain[Data Visualization, paclet:guide/DataVisualization])}, {▪(RefLinkPlain[Descriptive Statistics, paclet:guide/DescriptiveStatistics])}, {▪(RefLinkPlain[Charting and Information Visualization, paclet:guide/ChartingAndInformationVisualization])}, {▪(RefLinkPlain[Scientific Data Analysis, paclet:guide/ScientificDataAnalysis])}, {▪(RefLinkPlain[Reliability, paclet:guide/Reliability])}, {▪(RefLinkPlain[Probability & Statistics with Quantities, paclet:guide/ProbabilityWithQuantities])}})}})