scatterplot | R Documentation |
This module uses Plotly to create scatter plots
(see plot_ly
), of both 2D and 3D varieties.
scatterplot(
input,
output,
session,
getDatamatrix,
getThreedee = NULL,
getXAxis = NULL,
getYAxis = NULL,
getZAxis = NULL,
getShowLabels = NULL,
getPointSize = NULL,
getPalette = NULL,
colorBy = NULL,
getTitle = reactive({
""
}),
getLabels = reactive({
rownames(getDatamatrix())
}),
allow_3d = TRUE,
x = NA,
y = NA,
z = NA,
getLines = reactive({
NULL
})
)
input |
Input object |
output |
Output object |
session |
Session object |
getDatamatrix |
Reactive supplying a matrix. If using external controls
this should match the one supplied to |
getThreedee |
A reactive defining whether to plot in 3D. If set to NULL
(default), the |
getXAxis |
NULL, or if |
getYAxis |
NULL, or if |
getZAxis |
NULL, or if |
getShowLabels |
NULL, or if |
getPointSize |
NULL, or if |
getPalette |
An optional palette of colors, one for each level of colorBy. |
colorBy |
A reactive returning a factor definining the groups in which points should be colored. |
getTitle |
A reactive expression supplying a title. |
getLabels |
A reactive supplying a list of labels to use instead of row
names from |
allow_3d |
Passed to |
x |
Passed to |
y |
Passed to |
z |
Passed to |
getLines |
Reactive returning a data frame defining lines to be drawn. Three columns required: name, x and y, with two rows for every value of name. These two rows represent the start and end of a line. |
Controls for this module are provided by the scatterplotcontrols
module, which is automatically called if reactives are not supplied to the
server function. This setup allows the same set of controls to power
multiple scatter plots.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.