Description Usage Arguments Details Value Author(s) See Also Examples
Produces a dot plot of typical metrology comparison data (value/uncertainty) with error bars, assigned value and uncertainty and optional percentage deviation axis or marginal density
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | kplot(x, ...)
## Default S3 method:
kplot(x,U=NULL, labels=names(x), assigned=NULL, U.assigned=NULL,
U.lo=U, U.hi=U, k=2, strata=NULL,
do.percent=!is.null(assigned) && !do.pdf,
ordered=TRUE, order.strata=levels(strata),
xlim=c(0.5, length(x)+0.5), ylim,
main=NULL, xlab=NULL, ylab=NULL,
axis.main=2, axis.pct=4, at=1:length(x), at.main=NULL,
cex.axis=0.8, las=2, las.pct=1, ylab.line=2.5,
ylab.line.pct=2.1, ci.width=0.03, col.ci=par("fg"),
lty.ci=par("lty"), lwd.ci=par("lwd"), pch=21,
col=par("fg"), bg="white", add.outliers=FALSE,
outlier.offset=0.2, mar=NULL, box=TRUE,
do.pdf=FALSE, do.individual.pdf=do.pdf,
col.pdf=par("fg"), lwd.pdf=1, lty.pdf=1,
do.total.pdf=TRUE, col.total.pdf=col.pdf[1],
lwd.total.pdf=2, lty.total.pdf=1, n.pdf=200,
pdf.layout=c(4,1), pdf.scale=0.7, pdf.offset=0.05,
xlim.pdf, pdf.axis=FALSE, las.pdf=0,
mgp.pdf=c(3,0.5,0), ...)
## S3 method for class 'ilab'
kplot(x, ...)
kpoints(x,U=NULL, labels=names(x), U.lo=U, U.hi=U, k=2,
strata=NULL, ordered=TRUE, order.strata=levels(strata),
at=1:length(x), ci.width=0.03, col.ci=par("fg"),
lty.ci=par("lty"), lwd.ci=par("lwd"), pch=21,
col=par("fg"), bg="white", add.outliers=FALSE,
outlier.offset=0.2, ...)
|
x |
an R object. For the default method, a vector of reported values. For the ilab method, an object of class ‘ilab’ |
U |
Vector of length |
labels |
Vector of of length |
assigned |
Assigned value for the comparison. Plotted as a horizontal line on the plot. |
U.assigned |
Expanded uncertainty for the assigned value |
U.lo, U.hi |
Vectors of of length |
k |
Coverage factor originally used in calculating U. Required only if
|
strata |
A Factor identifying subsets of the data. Currently not implemented. |
do.percent |
Logical indicating whether percentage deviation should be
plotted as a secondary axis. Defaults to |
ordered |
If |
order.strata |
Character vector showing the order of plotting for strata. Currently not implemented. |
xlim, ylim |
Plot limits as in |
main, xlab, ylab |
Titles; see |
axis.main, axis.pct |
Integers specifying on which side of the plot the relevant axis is to
be drawn, passed to |
at |
Vector of x-axis locations for the data points, x-axis tick marks and labels.
Defaults to |
at.main |
The points at which tick-marks are to be drawn on the main (y) axis.
Passed to |
cex.axis |
The magnification to be used for axis annotation
relative to the current setting of 'cex'. Passed to |
las, las.pct |
Integers defining x- and y axis and percentage axis label
orientation; see |
ylab.line, ylab.line.pct |
Margin lines for main and percentage axis titles.
Passed to |
ci.width |
Width of error bar terminators, passed to |
col.ci, lty.ci, lwd.ci |
Graphical parameters for the error bars; passed
to |
pch, col, bg |
Graphical parameters for data points, passed to |
add.outliers |
If |
outlier.offset |
X-offset (in x-axis units) specifying lateral location of outlier tet labels relative to x-axis location of the outlier indicator. |
mar |
Plot margins as in |
box |
If |
do.pdf |
If |
do.individual.pdf |
Logical controlling whether the individual densities are plotted as well as/instead of the combined density. |
col.pdf, lwd.pdf, lty.pdf |
Graphical parameters controlling the appearance of the marginal density plot(s). Vectors are permitted, allowing different styles for each individual pdf. |
do.total.pdf |
Logical controlling whether the sum of individual densities is plotted. |
col.total.pdf, lwd.total.pdf, lty.total.pdf |
Graphical parameters controlling the appearance of the marginal density plot for the combined density. |
n.pdf |
Number of points used to construct the marginal density. |
pdf.layout |
Vector of length 2 specifying the relative sizes of the main plot and
marginal density plot. See |
pdf.scale, pdf.offset |
Offset and scaling factor used to control the location and height of the marginal density plot(s). |
xlim.pdf |
Controls the x-axis (i.e. the horizontal axis) for the marginal density plotting area. |
pdf.axis |
If |
las.pdf, mgp.pdf |
Axis control parameters passed to |
... |
Parameters passed to other functions; currently unused. |
If do.pdf=TRUE a marginal density plot is added. This plot is constructed
from a set of (currently) normal densities centred at x with standard
deviation U/k.
If a marginal density is plotted, par("layout") is changed to
pdf.layout; otherwise, par("layout") is set to matrix(1).
Both override any previously set layout. par("layout") is preserved on exit.
The ‘ilab’ method passes all parameters in ‘...’ to the default method
with default values for x, upper and lower bounds U.lo and U.hi,
labels and title taken from the ilab object.
kpoints is a convenience function for adding points with confidence
intervals to an existing plot. kpoints is not a generic function
and requires a vector x. Note that kpoints does not check for
the presence of a marginal density plot.
Invisibly returns a list with components:
order |
The order for plotting the original data, as returned by |
at |
x-axis locations used, in plotting order. |
S Ellison s.ellison@lgc.co.uk
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.