qqplot and qqnorm
qqplot(x, y; kwargs...)
Draw a Q-Q plot, comparing quantiles of two distributions. y
must be a list of samples, i.e., AbstractVector{<:Real}
, whereas x
can be
a list of samples,
an abstract distribution, e.g.
Normal(0, 1)
,a distribution type, e.g.
Normal
.
In the last case, the distribution type is fitted to the data y
.
The attribute qqline
(defaults to :none
) determines how to compute a fit line for the Q-Q plot. Possible values are the following.
:identity
draws the identity line.:fit
computes a least squares line fit of the quantile pairs.:fitrobust
computes the line that passes through the first and third quartiles of the distributions.:none
omits drawing the line.
Broadly speaking, qqline = :identity
is useful to see if x
and y
follow the same distribution, whereas qqline = :fit
and qqline = :fitrobust
are useful to see if the distribution of y
can be obtained from the distribution of x
via an affine transformation.
Plot type
The plot type alias for the qqplot
function is QQPlot
.
Attributes
color
= @inherit linecolor
— Control color of both line and markers (if markercolor
is not specified).
cycle
= [:color]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
linestyle
= nothing
— No docs available.
linewidth
= @inherit linewidth
— No docs available.
marker
= @inherit marker
— No docs available.
markercolor
= automatic
— No docs available.
markersize
= @inherit markersize
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
strokecolor
= @inherit markerstrokecolor
— No docs available.
strokewidth
= @inherit markerstrokewidth
— No docs available.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
qqnorm(y; kwargs...)
Shorthand for qqplot(Normal(0,1), y)
, i.e., draw a Q-Q plot of y
against the standard normal distribution. See qqplot
for more details.
Plot type
The plot type alias for the qqnorm
function is QQNorm
.
Attributes
color
= @inherit linecolor
— Control color of both line and markers (if markercolor
is not specified).
cycle
= [:color]
— No docs available.
depth_shift
= 0.0
— adjusts the depth value of a plot after all other transformations, i.e. in clip space, where 0 <= depth <= 1
. This only applies to GLMakie and WGLMakie and can be used to adjust render order (like a tunable overdraw).
fxaa
= true
— adjusts whether the plot is rendered with fxaa (anti-aliasing, GLMakie only).
inspectable
= true
— sets whether this plot should be seen by DataInspector
.
inspector_clear
= automatic
— Sets a callback function (inspector, plot) -> ...
for cleaning up custom indicators in DataInspector.
inspector_hover
= automatic
— Sets a callback function (inspector, plot, index) -> ...
which replaces the default show_data
methods.
inspector_label
= automatic
— Sets a callback function (plot, index, position) -> string
which replaces the default label generated by DataInspector.
linestyle
= nothing
— No docs available.
linewidth
= @inherit linewidth
— No docs available.
marker
= @inherit marker
— No docs available.
markercolor
= automatic
— No docs available.
markersize
= @inherit markersize
— No docs available.
model
= automatic
— Sets a model matrix for the plot. This overrides adjustments made with translate!
, rotate!
and scale!
.
overdraw
= false
— Controls if the plot will draw over other plots. This specifically means ignoring depth checks in GL backends
space
= :data
— sets the transformation space for box encompassing the plot. See Makie.spaces()
for possible inputs.
ssao
= false
— Adjusts whether the plot is rendered with ssao (screen space ambient occlusion). Note that this only makes sense in 3D plots and is only applicable with fxaa = true
.
strokecolor
= @inherit markerstrokecolor
— No docs available.
strokewidth
= @inherit markerstrokewidth
— No docs available.
transformation
= automatic
— No docs available.
transparency
= false
— Adjusts how the plot deals with transparency. In GLMakie transparency = true
results in using Order Independent Transparency.
visible
= true
— Controls whether the plot will be rendered or not.
Examples
Test if xs
and ys
follow the same distribution.
using CairoMakie
xs = randn(100)
ys = randn(100)
qqplot(xs, ys, qqline = :identity)
Test if ys
is normally distributed.
using CairoMakie
ys = 2 .* randn(100) .+ 3
qqnorm(ys, qqline = :fitrobust)
These docs were autogenerated using Makie: v0.21.0, GLMakie: v0.10.0, CairoMakie: v0.12.0, WGLMakie: v0.10.0