dplot3_pie | R Documentation |
Draw interactive pie charts using plotly
dplot3_pie(
x,
main = NULL,
xlab = NULL,
ylab = NULL,
col = NULL,
alpha = 0.8,
bg = NULL,
plot.bg = NULL,
theme = getOption("rt.theme", "black"),
palette = rtPalette,
category.names = NULL,
textinfo = "label+percent",
font.size = 16,
labs.col = NULL,
legend = TRUE,
legend.col = NULL,
sep.col = NULL,
margin = list(b = 50, l = 50, t = 50, r = 20),
padding = 0,
displayModeBar = TRUE,
modeBar.file.format = "svg",
filename = NULL,
file.width = 500,
file.height = 500,
file.scale = 1,
...
)
x |
data.frame: Input: Either a) 1 numeric column with categories defined by rownames, or
b) two columns, the first is category names, the second numeric or c) a numeric vector with categories defined using
the |
main |
Character: Plot title. Default = NULL, which results in colnames(x)[1], |
xlab |
Character: x-axis label. |
ylab |
Character: y-axis label. |
col |
Color, vector: Color for bars. Default NULL, which will draw
colors from |
alpha |
Float (0, 1]: Transparency for bar colors. Default = .8 |
bg |
Background color |
plot.bg |
Plot background color |
theme |
Character: "light", "dark". Default = |
palette |
Character: Name of rtemis palette to use.
Default = "rtCol1". Only used if |
category.names |
Character, vector, length = NROW(x): Category names. Default = NULL, which uses
either |
textinfo |
Character: Info to show over each slince: "label", "percent", "label+percent" Default = "label+percent" |
font.size |
Float: Font size for all labels. Default = 16 |
labs.col |
Color of labels |
legend |
Logical: If TRUE, draw legend. Default = NULL, and will be turned on if there is more than one feature present |
legend.col |
Color: Legend text color. Default = NULL, determined by theme |
sep.col |
Separator color |
margin |
Named list: plot margins. |
padding |
Integer: N pixels to pad plot. |
displayModeBar |
Logical: If TRUE, show plotly's modebar |
modeBar.file.format |
Character: "svg", "png", "jpeg", "pdf" / any output file type supported by plotly and your system |
filename |
Character: Path to file to save static plot. Default = NULL |
file.width |
Integer: File width in pixels for when |
file.height |
Integer: File height in pixels for when |
file.scale |
Numeric: If saving to file, scale plot by this number |
... |
Additional arguments passed to theme |
E.D. Gennatas
## Not run:
dplot3_pie(VADeaths[, 1, drop = F])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.