Skip to contents

This function creates an interactive Duane plot for a duane object. The plot includes options to customize the appearance, such as colors and grid visibility.

Usage

plotly_duane(
  duane_obj,
  showConf = TRUE,
  showGrid = TRUE,
  main = "Duane Plot",
  xlab = "Cumulative Time",
  ylab = "Cumulative MTBF",
  pointCol = "black",
  fitCol = "black",
  confCol = "black",
  gridCol = "lightgray",
  signif = 3
)

Arguments

duane_obj

An object of class 'duane'. This object is created using the `duane` function from the ReliaGrowR package.

showConf

Show the 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 "Duane Plot".

xlab

X-axis label. Default is "Cumulative Time".

ylab

Y-axis label. Default is "Cumulative MTBF".

pointCol

Color of the point values. Default is "black".

fitCol

Color of the model fit. Default is "black".

confCol

Color of the confidence bounds. Default is "black".

gridCol

Color of the grid. Default is "lightgray".

signif

Significant digits of results. Default is 3. Must be a positive integer.

Value

A `plotly` object representing the interactive Duane plot.

Examples

library(ReliaGrowR)
times <- c(100, 200, 300, 400, 500)
failures <- c(1, 2, 1, 3, 2)
fit <- duane(times, failures)
plotly_duane(fit)