Learn R Programming

rtemis (version 0.79)

dplot3.varimp: Plot variable importance using plotly

Description

A simple plotly wrapper to plot horizontal barplots, sorted by value, which can be used to visualized variable importance, model coefficients, etc.

Usage

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)

Arguments

varimp

Vector, float: Variable importance of features

names

Vector, string: Names of features

main

String: Plot title

xlab

String: x-axis label

ylab

String: y-axis label

col

Vector, colors: Single value, or multiple values to define bar (feature) color(s)

mar

Vector, numeric, length 4: Plot margins in pixels (NOT inches). Default = c(50, 110, 50, 50)

pad

Integer: Pad plot by this many pixels. Default = 10

font.family

String: Font to use. Default = "Open Sans"

font.size

Integer: Overall font size to use (essentially for the title at this point). Default = 14

axis.font.size

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!)

font.color

Color for all text

showlegend

Logical: If TRUE, show legend