plot.mid.importance {midr} | R Documentation |
Plot MID Importance with graphics Package
Description
For "mid.importance" objects, plot()
visualizes the importance of MID component functions.
Usage
## S3 method for class 'mid.importance'
plot(
x,
type = c("barplot", "dotchart", "heatmap", "boxplot"),
theme = NULL,
max.bars = 30L,
...
)
Arguments
x |
a "mid.importance" object to be visualized. |
type |
a character string specifying the type of the plot. One of "barplot", "heatmap", "dotchart" or "boxplot". |
theme |
a character string specifying the color theme or any item that can be used to define "color.theme" object. |
max.bars |
an integer specifying the maximum number of bars in the barplot, boxplot and dotchart. |
... |
optional parameters to be passed to the graphing function. Possible arguments are "col", "fill", "pch", "cex", "lty", "lwd" and aliases of them. |
Details
The S3 method of plot()
for "mid.importance" objects creates a visualization of the MID importance using the functions of the graphics package.
Value
plot.mid.importance()
produces a plot and returns NULL
.
Examples
data(diamonds, package = "ggplot2")
set.seed(42)
idx <- sample(nrow(diamonds), 1e4)
mid <- interpret(price ~ (carat + cut + color + clarity)^2, diamonds[idx, ])
imp <- mid.importance(mid)
plot(imp, theme = "Tableau 10")
plot(imp, type = "dotchart", theme = "Okabe-Ito")
plot(imp, type = "heatmap", theme = "Blues")
plot(imp, type = "boxplot", theme = "Accent")