Learn R Programming

weibulltools (version 1.0.1)

plot_layout: Layout of the Probability Plot

Description

This function is used to create the layout of a probability plot.

Usage

plot_layout(x, distribution = c("weibull", "lognormal", "loglogistic",
  "normal", "logistic", "sev"), title_main = "Probability Plot",
  title_x = "Characteristic", title_y = "Unreliability")

Arguments

x

a numeric vector which consists of lifetime data. x is used to specify the grid of the plot.

distribution

supposed distribution of the random variable. The value can be "weibull", "lognormal", "loglogistic", "normal", "logistic" or "sev" (smallest extreme value). Other distributions have not been implemented yet.

title_main

a character string which is assigned to the main title of the plot.

title_x

a character string which is assigned to the title of the x axis.

title_y

a character string which is assigned to the title of the y axis.

Value

Returns a plotly object which contains the layout that is used for probability plotting.

Examples

Run this code
# NOT RUN {
# Example 1: Weibull-Grid:
x_layout <- seq(1e-5, 1e+07, length.out = 10)
grid_weibull <- plot_layout(x = x_layout,
                            distribution = "weibull",
                            title_main = "Weibull Analysis",
                            title_x = "Time to Failure",
                            title_y = "Failure Probability in %")

# Example 2: Grid of Normal Distribution:
x_layout <- seq(1, 10, length.out = 10)
grid_normal <- plot_layout(x = x_layout,
                            distribution = "normal",
                            title_main = "Normal Grid",
                            title_x = "Time to Event",
                            title_y = "Failure Probability in %")
# }

Run the code above in your browser using DataLab