Creates an interactive probability plot for an `alt` object, overlaying one Weibull or lognormal fit line per stress level on a shared probability paper. The `alt` object must have been processed through [WeibullR.ALT::alt.parallel()] before passing to this function.
Usage
plotly_alt(
alt_obj,
showConf = TRUE,
showGrid = TRUE,
main = "ALT Probability Plot",
xlab = "Time to Failure",
ylab = "Probability",
gridCol = "lightgray",
signif = 3,
cols = NULL
)Arguments
- alt_obj
An object of class `'alt'` created by the `WeibullR.ALT` package and fitted with `alt.parallel()`.
- showConf
Show Fisher-matrix confidence bounds (TRUE) or not (FALSE). Default is TRUE.
- showGrid
Show grid (TRUE) or hide grid (FALSE). Default is TRUE.
- main
Main title. Default is "ALT Probability Plot".
- xlab
X-axis label. Default is "Time to Failure".
- ylab
Y-axis label. Default is "Probability".
- gridCol
Color of the grid. Default is "lightgray".
- signif
Significant digits for hover text. Default is 3.
- cols
Optional character vector of colors, one per stress level. Recycled to match the number of stress levels. When NULL a 10-color default palette is used.
Examples
library(WeibullR.ALT)
#> Loading required package: WeibullR
d1 <- alt.data(c(248, 456, 528, 731, 813, 537), stress = 300)
d2 <- alt.data(c(164, 176, 289), stress = 350)
d3 <- alt.data(c(88, 112, 152), stress = 400)
obj <- alt.fit(
alt.parallel(
alt.make(list(d1, d2, d3), dist = "weibull", alt.model = "arrhenius", view_dist_fits = FALSE),
view_parallel_fits = FALSE
)
)
plotly_alt(obj)