wblr Object Plotting on pretty canvaxThis function adds the .wblr method to plot.default
from the graphics package.
Currently, the function plots the (life-)time observations, fits (if any)
and confidence bounds for B-lives (if any) of an
wblr object or a list of wblr objects on Weibull or
Lognormal probability paper.
For each fit in the (list of) wblr object(s), legends are added to
the plot, displaying the fit parameters and (if available) goodness-of-fit
indicators and confidence information.
# S3 method for wblr
plot(x, ...)Currently, the function returns no value.
Object of class "wblr" or a list of wblr objects.
Options for plotting the wblr object; see section "Details".
The ... argument can be any graphical parameter that can be
supplied to plot.default, and any option that can be
set by the function options.wblr. The options set
in this way are applied to all graphical elements of the plot, overriding
any previously supplied options.
One can pass a list of wblr objects to plot.wblr; in
that case it is mandatory to use the full method name: plot.wblr(...)
and not plot(...).
The calculated Weibull or Lognormal distribution fits are plotted
on Weibull probability paper by default, but by passing the argument
canvas = "lognormal" to the function, Lognormal paper is used.
When a list of wblr objects is passed, the plot window is generated
with the options of the first wblr object in the list.
Graphical controls typically used with plot or plot.wblr:
canvasThe plotting canvas to be used. This does not necessarily have to match the fit distribution.
Only "weibull" (default) or "lognormal" are recognized.
marMargins defaults to c(5.1,4.1,5.1,2.1),.
mainTitle, defaults to "Probability Plot".
main.contourContour plot title defaults to "Contour Plot".
subSubtitle defaults to NULL.
sub.contourContour subtitle defaults to NULL.
xlimPlot x limits override to be presented as a vector c(lo,hi), default NULL.
ylimPlot y limits override to be presented as a vector c(lo,hi), default NULL.
xlabX axis label defaults to "Time To Failure".
ylabY axis label defaults to "Unreliability [%]".
coordinate.text.sizedefault 0.7.
signifUsed to control display of numbers in Legend, default 4.
col.gridColor for chart gridlines defaults "grey".
is.plot.griddefault TRUE.
is.plot.fitdefault TRUE.
is.plot.ppdefault TRUE.
is.plot.ppcoordinatesdefault FALSE.
is.plot.legenddefault TRUE.
legend.positiondefault "bottomright". See legend Details.
legend.insetdefault c(0,0). legend inset values are fractions of graph width and height.
legend.text.sizedefault 0.7.
labeldefaults to "".
in.legenddefault TRUE.
in.legend.blivesdefault TRUE.
in.legend.gofdefault TRUE.
is.plot.cbdefault TRUE.
persistentdefault TRUE.
Jurgen Symynck, Filip De Bal, Weibull analysis using R, in a nutshell (New Technologies and Products in Machine Manufacturing Technology, Stefan cel Mare University of Suceava, 2010).
Jurgen Symynck, Filip De Bal, Monte Carlo pivotal confidence bounds for Weibull analysis, with implementations in R (New Technologies and Products in Machine Manufacturing Technology, Stefan cel Mare University of Suceava, 2011).
options.wblr(blives=0.1) # make the legend boxes a bit shorter...
da2 <- wblr.conf(wblr.fit(wblr(runif(5,10,100),col="red")))
da3 <- wblr.conf(wblr.fit(wblr(rweibull(5,2,1000),col="green4",pch=3)))
da4 <- wblr.conf(wblr.fit(wblr(rlnorm(5,log(500),log(2)),col="blue3",pch=8),
dist="lognormal"))
if (FALSE) {
plot.wblr(list(da2,da3,da4),xlim=c(1,1e6),
main="Uniformly distributed observations")
}
Run the code above in your browser using DataLab