View source: R/labeledscatterchart.R
LabeledScatter | R Documentation |
Labeled Scatter Chart
LabeledScatter(
x = NULL,
y = NULL,
scatter.x.column = 1,
scatter.y.column = 2,
scatter.labels = NULL,
scatter.labels.name = NULL,
scatter.sizes = NULL,
scatter.sizes.name = NULL,
scatter.sizes.column = 3,
scatter.colors = NULL,
scatter.colors.name = NULL,
scatter.colors.column = 4,
scatter.colors.as.categorical = TRUE,
label.auto.placement = TRUE,
trend.lines = FALSE,
logos = NULL,
logo.size = 0.5,
colors = ChartColors(12),
opacity = NULL,
legend.show = TRUE,
legend.bubbles.show = TRUE,
global.font.family = "Arial",
global.font.color = rgb(44, 44, 44, maxColorValue = 255),
title = "",
title.font.family = global.font.family,
title.font.color = global.font.color,
title.font.size = 16,
subtitle = "",
subtitle.font.family = global.font.family,
subtitle.font.color = global.font.color,
subtitle.font.size = 12,
footer = "",
footer.font.family = global.font.family,
footer.font.color = global.font.color,
footer.font.size = 8,
footer.wrap = TRUE,
footer.wrap.nchar = 100,
scatter.max.labels = 50,
data.label.font.family = global.font.family,
data.label.font.color = global.font.color,
data.label.font.autocolor = NA,
data.label.font.size = 10,
data.label.format = "",
data.label.prefix = "",
data.label.suffix = "",
legend.font.color = global.font.color,
legend.font.family = global.font.family,
legend.font.size = 10,
grid.show = TRUE,
y.title = "",
y.title.font.color = global.font.color,
y.title.font.family = global.font.family,
y.title.font.size = 12,
y.line.width = 0,
y.line.color = rgb(0, 0, 0, maxColorValue = 255),
y.bounds.minimum = NULL,
y.bounds.maximum = NULL,
y.tick.distance = NULL,
y.tick.maxnum = NULL,
y.grid.width = 1,
y.grid.color = rgb(225, 225, 225, maxColorValue = 255),
y.tick.show = TRUE,
y.tick.suffix = "",
y.tick.prefix = "",
y.tick.format = "",
y.tick.font.color = global.font.color,
y.tick.font.family = global.font.family,
y.tick.font.size = 10,
x.title = "",
x.title.font.color = global.font.color,
x.title.font.family = global.font.family,
x.title.font.size = 12,
x.line.width = 0,
x.line.color = rgb(0, 0, 0, maxColorValue = 255),
x.bounds.minimum = NULL,
x.bounds.maximum = NULL,
x.tick.distance = NULL,
x.tick.maxnum = NULL,
x.grid.width = 1,
x.grid.color = rgb(225, 225, 225, maxColorValue = 255),
x.tick.show = TRUE,
x.tick.suffix = "",
x.tick.prefix = "",
x.tick.format = "",
x.tick.font.color = global.font.color,
x.tick.font.family = global.font.family,
x.tick.font.size = 10,
hovertext.font.family = global.font.family,
hovertext.font.size = 11,
marker.size = 6,
swap.x.and.y = FALSE,
...
)
x |
A numeric vector for the x-axis coordinates (which may be named); or a matrix or dataframe; or a list of matrices, where each matrix share the same row and column names |
y |
Optional numeric vector for the y-axis coordinates. Should contain the same number of observations as x. If not provided, will use x instead. |
scatter.x.column |
When |
scatter.y.column |
When |
scatter.labels |
Optional vector for labelling scatter points. This should be the same length as the number of observations in x and y. |
scatter.labels.name |
Character; Used for labelling subtitles and footers. |
scatter.sizes |
Numeric vector determining of the size of each observation. These can alternatively be provided as a column in |
scatter.sizes.name |
Character; Used for labelling footers and legends. |
scatter.sizes.column |
When |
scatter.colors |
Numeric, character, or categorical vector determining the color of each observation. These can alternatively be provided as a column in |
scatter.colors.name |
Character; Used for labelling footers. |
scatter.colors.column |
When |
scatter.colors.as.categorical |
Boolean; Whether to treat colors as a categorical groups, or a numeric scale. |
label.auto.placement |
Logical; whether the scatter plot labels are positioned automatically to reduce overlap. |
trend.lines |
Boolean indicating whether to plot trend lines for multiple tables. |
logos |
Optional list of images to be used to label scatterplot instead of the row names. This should be input as a comma-seperated list of URLs. |
logo.size |
Numeric controlling the size of the logos. |
colors |
A vector of colors to use in the chart. When |
opacity |
of scatter point colors as an alpha value (0 to 1). |
legend.show |
Controls whether legend is shown. This can be a logical ( |
legend.bubbles.show |
Logical; show legend for bubble sizes. |
global.font.family |
Character; font family for all occurrences of any font attribute for the chart unless specified individually. |
global.font.color |
Global font color as a named color in character format (e.g. "black") or an a hex code. |
title |
Character; chart title. |
title.font.family |
Character; title font family. Can be "Arial Black", "Arial", "Comic Sans MS", "Courier New", "Georgia", "Impact", "Lucida Console", "Lucida Sans Unicode", "Marlett", "Symbol", "Tahoma", "Times New Roman", "Trebuchet MS", "Verdana", "Webdings" |
title.font.color |
Title font color as a named color in character format (e.g. "black") or a hex code. |
title.font.size |
Integer; Title font size; default = 10. |
subtitle |
Character |
subtitle.font.family |
Character; subtitle font family |
subtitle.font.color |
subtitle font color as a named color in character format (e.g. "black") or an a hex code. |
subtitle.font.size |
Integer; subtitle font size |
footer |
Character |
footer.font.family |
Character; footer font family |
footer.font.color |
footer font color as a named color in character format (e.g. "black") or an a hex code. |
footer.font.size |
Integer; footer font size |
footer.wrap |
Logical; whether the footer text should be wrapped. |
footer.wrap.nchar |
Number of characters (approximately) in each
line of the footer when |
scatter.max.labels |
Integer; the maximum number of labels to show on a Labeled Scatterplot. If the number of labels is greater than this parameter, extra labels will be hidden by default but can be toggled on by clicking on the marker. |
data.label.font.family |
Character; font family for data label. |
data.label.font.color |
Font color as a named color in character format (e.g. "black") or an a hex code. This can be a single color, a vector of colors (1 for each series/column), or a comma separated list of colors |
data.label.font.autocolor |
Boolean; If true, |
data.label.font.size |
Integer; Font size for data label.px. |
data.label.format |
A string representing a d3 formatting code. See https://github.com/mbostock/d3/wiki/Formatting#numbers |
data.label.prefix |
Character; prefix for data values. |
data.label.suffix |
Character; suffix for data values. |
legend.font.color |
Legend font color as a named color in character format (e.g. "black") or a hex code. |
legend.font.family |
Character; legend font family. |
legend.font.size |
Integer; Legend font size. |
grid.show |
Logical; whether to show grid lines. |
y.title |
Character, y-axis title; defaults to chart input values; to turn off set to "FALSE". |
y.title.font.color |
y-axis title font color as a named color in character format (e.g. "black") or a hex code. |
y.title.font.family |
Character; y-axis title font family |
y.title.font.size |
Integer; y-axis title font size |
y.line.width |
y-axis line width in pixels (0 = no line). |
y.line.color |
y-axis line color as a named color in character format (e.g. "black") or a hex code. |
y.bounds.minimum |
Minimum of range for plotting; For a date axis this should be supplied as a date string. For a categorical axis, the index of the category (0-based) should be used. |
y.bounds.maximum |
Maximum of range for plotting; NULL = no manual range set. |
y.tick.distance |
Distance between tick marks. Requires that |
y.tick.maxnum |
Maximum number of ticks shown on the axis.
This setting is ignored if |
y.grid.width |
Width of y-grid lines in pixels; 0 = no line |
y.grid.color |
Color of y-grid lines as a named color in character format (e.g. "black") or a hex code. |
y.tick.show |
Whether to display the y-axis tick labels |
y.tick.suffix |
y-axis tick label suffix |
y.tick.prefix |
y-axis tick label prefix |
y.tick.format |
A string representing a d3 formatting code. See https://github.com/d3/d3/blob/master/API.md#number-formats-d3-format |
y.tick.font.color |
y-axis tick label font color as a named color in character format (e.g. "black") or an a hex code. |
y.tick.font.family |
Character; y-axis tick label font family |
y.tick.font.size |
Integer; y-axis tick label font size |
x.title |
Character, x-axis title; defaults to chart input values; to turn off set to "FALSE". |
x.title.font.color |
x-axis title font color as a named color in character format (e.g. "black") or an a hex code. |
x.title.font.family |
Character; x-axis title font family |
x.title.font.size |
Integer; x-axis title font size |
x.line.width |
x-axis line in pixels, 0 = no line |
x.line.color |
x-axis line color as a named color in character format (e.g. "black") or a hex code. |
x.bounds.minimum |
Minimum of range for plotting; For a date axis this should be supplied as a date string. For a categorical axis, the index of the category (0-based) should be used. |
x.bounds.maximum |
Maximum of range for plotting; NULL = no manual range set. Must be greater than x.bounds.minimum |
x.tick.distance |
Tick mark distance in x-axis units between minimum and maximum for plotting; NULL = no manual range set. |
x.tick.maxnum |
Maximum number of ticks shown on the axis.
It defaults to 11 which gives the same output from plotly as NULL.
This setting is ignored if |
x.grid.width |
Width of y-grid lines in pixels; 0 = no line |
x.grid.color |
Color of y-grid lines as a named color in character format (e.g. "black") or a hex code. |
x.tick.show |
Whether to display the x-axis tick labels |
x.tick.suffix |
x-axis tick label suffix |
x.tick.prefix |
x-axis tick label prefix |
x.tick.format |
A string representing a d3 formatting code. See https://github.com/mbostock/d3/wiki/Formatting#numbers |
x.tick.font.color |
X-axis tick label font color as a named color in character format (e.g. "black") or an a hex code. |
x.tick.font.family |
Character; x-axis tick label font family |
x.tick.font.size |
Integer; x-axis tick label font size |
hovertext.font.family |
Font family of hover text. |
hovertext.font.size |
Font size of hover text. |
marker.size |
Size in pixels of marker. |
swap.x.and.y |
Swap the x and y axis around on the chart. |
... |
Other arguments which are ignored. |
z <- structure(c(1L, 2L, 3L, 4L, 5L, 2L, 3L, 4L, 5L, 6L), .Dim = c(5L, 2L),
.Dimnames = list(c("T", "U", "V", "W", "X"), c("A", "B")))
Column(z, type="Stacked Column")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.