plotly_contour {WeibullR.plotly} | R Documentation |
Interactive Contour Plot
Description
This function creates an interactive contour plot for one or more 'wblr' objects, each assumed to have confidence contours generated via ‘method.conf = ’lrb''. The function overlays all contours in a single plot and displays their respective MLE point estimates.
Usage
plotly_contour(
wblr_obj,
main = "Contour Plot",
xlab = "Eta",
ylab = "Beta",
showGrid = TRUE,
cols = NULL,
gridCol = "lightgray",
signif = 3
)
Arguments
wblr_obj |
A single 'wblr' object or a list of 'wblr' objects. |
main |
Main title for the plot. |
xlab |
X-axis label (typically Eta or Sigmalog). |
ylab |
Y-axis label (typically Beta or Mulog). |
showGrid |
Logical; whether to show grid lines (default TRUE). |
cols |
Optional vector of colors for each contour/estimate pair. If not provided, colors are chosen from a default palette. |
gridCol |
Color of the grid lines (default 'lightgray'). |
signif |
Number of significant digits to display for estimates and contour coordinates. |
Value
A 'plotly' object representing the interactive contour plot.
Examples
library(WeibullR)
library(WeibullR.plotly)
failures1 <- c(30, 49, 82, 90, 96)
failures2 <- c(20, 40, 60, 80, 100)
obj1 <- wblr.conf(wblr.fit(wblr(failures1), method.fit = 'mle'), method.conf = 'lrb')
obj2 <- wblr.conf(wblr.fit(wblr(failures2), method.fit = 'mle'), method.conf = 'lrb')
plotly_contour(list(obj1, obj2), main = "Overlayed Contours")