plotly
A simple plotly
wrapper to plot horizontal barplots, sorted by value, which can be used
to visualized variable importance, model coefficients, etc.
dplot3.varimp(varimp, names = NULL, main = "Variable Importance",
xlab = "", ylab = "", col = colorAdjust(colorGrad(length(names),
"penn"), 0.8), mar = c(50, 110, 50, 50), pad = 10,
font.family = "Open Sans", font.size = 14, axis.font.size = 18,
font.color = "000", showlegend = TRUE)
Vector, float: Variable importance of features
Vector, string: Names of features
String: Plot title
String: x-axis label
String: y-axis label
Vector, colors: Single value, or multiple values to define bar (feature) color(s)
Vector, numeric, length 4: Plot margins in pixels (NOT inches). Default = c(50, 110, 50, 50)
Integer: Pad plot by this many pixels. Default = 10
String: Font to use. Default = "Open Sans"
Integer: Overall font size to use (essentially for the title at this point). Default = 14
Integer: Font size to use for axis labels and tick labels
(Seems not to be in same scale as font.size
for some reason. Experiment!)
Color for all text
Logical: If TRUE, show legend