plotly
)Build dynamic plots that can be viewed in RStudio Viewer, a web browser, or exported to a static image. Support for (x, y) scatter plots with optional fit line(lm, or gam), and density plots.
dplot3(x, y = NULL, mode = NULL, group = NULL, point.size = 7,
point.color = NULL, point.alpha = 0.66, point.symbol = "circle",
point.labels = NULL, fit = "none", axes.fixedratio = FALSE,
xlim = NULL, ylim = NULL, gam.k = 4, fit.width = 3,
fit.color = "#18A3AC", fit.alpha = 1, se.fit = TRUE,
se.times = 2, se.color = NULL, se.alpha = 0.2,
density.color = "#18A3AC", density.alpha = 0.66, density.width = 1,
density.mean = FALSE, density.mean.width = 2, main = NULL,
xlab = "x", ylab = "y", font.family = "Helvetica Neue",
font.color = "gray50", font.size = 18, axes = FALSE, grid = TRUE,
grid.col = "#fff", zero.lines = TRUE, zero.col = "#7F7F7F",
zero.lwd = 1, legend = TRUE, legend.bgcol = "#00000000",
legend.bordercol = "gray50", legend.borderwidth = 0,
legend.fontcol = "#000000", margins = c(60, 70, 40, 20), pad = 4,
bg = "#E5E5E5", showlegend = TRUE, legend.xy = c(0, 1),
axes.square = FALSE, height = NULL, width = NULL)
Numeric vector. x coordinates
Numeric vector. y coordinates
String: "scatter" or "density"
String: Name of variable to group by (not yet functional)
Numeric scalar or vector
Color of points
Float: Alpha of points
String: "circle", "square"; see plotly documentation for more Default = "circle"
String, optional: Point labels displayed on mouse over
String, optional: "lm", "gam"
Integer: Number of bases for mgcv::gam
's smoothing spline
Float: Width of fit line
Color of fit line
Float: Alpha of fit line
Logical: If TRUE, draws +/- se.times * standard error
Float: Multiplier for standard error band. Default = 2
Color of S.E. band
Float: Alpha of S.E. band
Color of density line
Float: Alpha of density line
Integer: Width of density line
Logical: If TRUE, draw vertical line at mean(x)
Integer: Width of density.mean
line. Default = 2
String: Plot title
String: x-axis label
String: y-axis label
String: Axes' legends' font family
Font color
Integer: Font size
Logical: If TRUE, show x and y axes. Default = TRUE
Logical: If TRUE, draw grid lines. Default = FALSE
Numeric: Distance of tick labels from axes
Logical: If TRUE, show legends
Vector, length 2 [0, 1]: x, y coordinates of legend. 0 means left and bottom for x and y axis respectively; 1 means right and top. Default = c(0, 1) (i.e. top-left)
Logical: If TRUE, make axes square
Vector, length 4: Plot margins. Default = c(60, 70, 40, 20)