View source: R/scatterplotmatrix.R
ScatterplotMatrix | R Documentation |
Creates a matrix of scatterplots showing the distribution of variable pairs
ScatterplotMatrix(
x,
weights = 1:NROW(x),
seed = 123,
modifications = "Enlarge points with multiple observations",
fit.type = "None",
fit.line.type = "solid",
fit.line.width = 2,
fit.line.color = "#990000",
fit.line.opacity = 1,
point.symbol = "circle",
point.size = 10,
point.color = "#5C9AD3",
point.opacity = 0.4,
histogram.color = "#5C9AD3",
histogram.opacity = 1,
correlation.decimals = 2,
background.fill.color = "transparent",
background.fill.opacity = 1,
charting.area.fill.color = "transparent",
charting.area.fill.opacity = 1,
global.font.family = "Arial",
global.font.color = "#222222",
label.font.family = global.font.family,
label.font.color = global.font.color,
label.font.size = 12,
correlation.font.family = global.font.family,
correlation.font.color = global.font.color,
correlation.font.size = 12,
hovertext.font.family = global.font.family,
hovertext.font.size = 10,
tick.font.family = global.font.family,
tick.font.color = global.font.color,
tick.font.size = 9,
tick.length = 3,
tick.format = "",
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,
panel.outline = TRUE,
panel.line.width = 1,
panel.line.color = "#BBBBBB",
panel.extend = 0.1,
panel.gap = 0.01,
margin.left = NULL,
margin.right = NULL,
margin.top = NULL,
margin.bottom = NULL,
margin.autoexpand = TRUE,
modebar.show = FALSE,
tooltip.show = TRUE,
axis.drag.enable = FALSE,
zoom.enable = FALSE
)
x |
A dataframe containing the variables to be plotted. |
weights |
A numeric vector with length equal to the number of rows in |
seed |
A seed used to generate random variables for jitter. |
modifications |
One of "None", "Jitter", or "Enlarge points with multiple observations". |
fit.type |
Character; type of line of best fit to show in the scatterplot in the lower triangle of the graphic. One of "None", "LOESS", or "Straight". |
fit.line.type |
Character; One of "solid", "dot", "dash, "dotdash", or length of dash "2px", "5px". |
fit.line.width |
Numeric; Line width of line of best fit. |
fit.line.color |
Color of line of best fit. |
fit.line.opacity |
Opacity of trend line as an alpha value (0 to 1). |
point.symbol |
Character; symbol used in scatterplots in the lower triangle of the graphic See https://plotly-r.com/working-with-symbols.html for a list of symbol names. |
point.size |
Size of points in scatterplots in pixel. If point sizes vary by frequency, then this parameter specfies the maximum size of the points. |
point.color |
Color of the points in the scatterplots. |
point.opacity |
Opacity of the points in the scatterplots as an alpha value (0 to 1). |
histogram.color |
Color of the histogram bars shown in the diagonal panels. |
histogram.opacity |
Opeacity of the histogram bars as an alpha value (0 to 1). |
correlation.decimals |
Number of decimals used to show correlation values in the upper trangle. |
background.fill.color |
Background color in character format (e.g. "black") or a hex code. |
background.fill.opacity |
Background opacity as an alpha value (0 to 1). |
charting.area.fill.color |
Charting area background color as a named color in character format (e.g. "black") or a hex code. |
charting.area.fill.opacity |
Charting area background opacity as an alpha value (0 to 1). |
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. |
label.font.family |
Font family of the variable name labels shown in the diagonal panels. |
label.font.color |
Font color of the variable name labels. |
label.font.size |
Font size of the variable name labels in units of pixels. |
correlation.font.family |
Font family of correlation values shown in the upper triangle. |
correlation.font.color |
Font color of correlation values. |
correlation.font.size |
Font size of correlation values in pixels. |
hovertext.font.family |
Font family of hover text (tooltips). Font color will be automatically determined based on the color of the points or histograms. |
hovertext.font.size |
Font size of hover text in pixels. |
tick.font.family |
Font family of ticks labels (across all panel). |
tick.font.color |
Font color of the tick labels. |
tick.font.size |
Font size tick labels in pixels. |
tick.length |
Length of tick labels in pixels. |
tick.format |
Format of the ticklabels in D3 (e.g. ".1f"). Leave blank for plotly to automatically set format based on values. |
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 |
panel.outline |
Logical; whether of not to show outline around each of the panels. |
panel.line.width |
Line width of panel.outllne in pixels. |
panel.line.color |
Color of panel lines. |
panel.extend |
The extent to which the range in each panel should extend past the range of the variable. |
panel.gap |
Space between the panels of the scatterplot matrix as a proportion of the total graphic. |
margin.left |
Margin between charting area and the left of the graphic in pixels. |
margin.right |
Margin between charting area and the right of the graphic in pixels. |
margin.top |
Margin between charting area and the top of the graphic in pixels. |
margin.bottom |
Margin between charting area and the bottom of the graphic in pixels. |
margin.autoexpand |
Logical; Whether extra space can be added to the margins to allow space for axis labels or other chart elements. |
modebar.show |
Logical; whether to show the zoom menu buttons or not. |
tooltip.show |
Logical; whether to show a tooltip on hover. |
axis.drag.enable |
Logical; whether to enable the user to drag along axes.
This interaction is available when the cursor shows up as a double-headed arrow
when hovering over an axis. It is turned off by default because it can sometimes
cause problems with data labels and annotations. Also, is only used when
|
zoom.enable |
Logical; whether to enable zoom on the chart. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.