R/plot_xy_NumGroup.R
plot_xy_NumGroup.Rd
This function takes a data table, quantitative X and Y variables, and a numeric grouping variable, and a and plots a graph with using geom_point
. The numerical NumGroup
variable is mapped to the fill
aesthetic of symbols, which receives the scale_fill_grafify_c
default palette.
plot_xy_NumGroup(
data,
xcol,
ycol,
NumGroup,
symsize = 2.5,
symthick = 1,
s_alpha = 1,
TextXAngle = 0,
fontsize = 20
)
a data table object, e.g. data.frame or tibble.
name of the column with quantitative X variable.
name of the column with quantitative Y variable.
a numeric factor for fill
aesthetic of data points.
size of symbols used by geom_point
. Default set to 2.5, increase/decrease as needed.
thickness of symbol border, default set to 1.
fractional opacity of symbols, default set to 1 (i.e. maximum opacity & zero transparency).
orientation of text on X-axis; default 0 degrees. Change to 45 or 90 to remove overlapping text.
parameter of base_size
of fonts in theme_classic
, default set to size 20.
This function returns a ggplot2
object of class "gg" and "ggplot".
This plot is related to plot_xy_CatGroup
which requires a categorical grouping factor.
When summary statistics (mean/median) are required, use plot_3d_scatterbar
, plot_3d_scatterbox
or plot_4d_scatterbox
.
#The grouping factor gear is numeric
plot_xy_NumGroup(data = mtcars,
xcol = mpg, ycol = disp, NumGroup = cyl,
s_alpha = 0.8)