ggassoc_scatter.RdDisplays of scatter plot and adds a smoothing line, using ggplot2.
ggassoc_scatter(data, mapping, na.rm = FALSE,
axes.labs = TRUE, ticks.labs = TRUE, text.size = 3)dataset to use for plot
aesthetic being used. It must specify x and y.
logical, indicating whether NA values should be silently removed before the computation proceeds. Default is FALSE.
Whether to display the labels of the axes, i.e. the names of x and y. Default is TRUE.
Whether to display the labels of the categories of x and y. Default is TRUE.
Size of the association measure. If NULL, the text is not added to the plot.
Kendall's tau rank correlation between x and y is displayed in upper-left corner of the plot.
Smoothing is performed with gam.
This function can be used as a high-level plot with ggduo and ggpairs functions of the GGally package.
a ggplot object
data(Movies)
ggassoc_scatter(Movies, mapping = ggplot2::aes(x = Budget, y = Critics))
#> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
#> ℹ Please use `linewidth` instead.
#> ℹ The deprecated feature was likely used in the descriptio package.
#> Please report the issue at
#> <https://framagit.org/nicolas-robette/descriptio/-/issues>.
#> Warning: Ignoring unknown parameters: `label.size`
#> `geom_smooth()` using formula = 'y ~ s(x, bs = "cs")'