scatterPlot {ddplot} | R Documentation |
Create a scatter plot.
Description
Create a scatter plot.
Usage
scatterPlot(
data,
x,
y,
col = "crimson",
size = 2,
xticks = NULL,
yticks = NULL,
xtitle = NULL,
xtitleFontSize = 16,
ytitle = NULL,
ytitleFontSize = 16,
title = NULL,
titleFontSize = 22,
stroke = NULL,
strokeWidth = NULL,
font = "Verdana, Geneva, Tahoma, sans-serif",
bgcol = "#CAD0D3",
opacity = 1,
axisCol = "black",
width = NULL,
height = NULL
)
Arguments
data |
The data frame containing the quantitative variables. |
x |
The x-variable to consider. |
y |
The y-variable to consider. |
col |
The color of the dots. Defaults to 'crimson'. |
size |
The size of the dots. Defaults to 2. |
xticks |
Optional. The number of x-axis ticks to consider. |
yticks |
Optional. The number of y-axis ticks to consider. |
xtitle |
Optional. the title of the x-axis. |
xtitleFontSize |
The font size of the x-axis title. Defaults to 16. |
ytitle |
Optional. The title of the y-axis. |
ytitleFontSize |
The font size of the y-axis title. Defaults to 16. |
title |
Optional. the title of the plot. |
titleFontSize |
The font size of the plot title. Defaults to 22. |
stroke |
Optional. the stroke color of the dots. |
strokeWidth |
Optional. the stroke width of the dots. |
font |
The font family to consider for the titles. Defaults to "Verdana, Geneva, Tahoma, sans-serif". |
bgcol |
The background color of the SVG. Defaults to "#CAD0D3" HEX color. |
opacity |
The color opacity of the dots (from 0 to 1). Defaults to 1. |
axisCol |
the color of the x and y axis. It includes the ticks, the labels and titles. Defaults to 'black'. |
width |
Optional. the width of the SVG output. |
height |
Optional. the height of the SVG output. |
Value
A SVG scatter plot.
Examples
scatterPlot(
data = mtcars,
x = "mpg",
y = "wt"
)