I tried to draw a graph in the ggplot2 library with the addition of ggrepel:
set.seed(42)
ggplot(mtcars) +
geom_point(aes(wt, mpg), size = 5, color = 'grey') +
geom_label_repel(aes(wt, mpg, fill = factor(cyl), label = rownames(mtcars)),
fontface = 'bold', color = 'white',
box.padding = 0.35, point.padding = 0.5,
segment.color = 'grey50') +
theme_classic(base_size = 16)
But I got the following error:
Error in convertUnit(x, unitTo, "x", "dimension", "x", "dimension", valueOnly = valueOnly) : 'x' argument must be a unit object
Thanks?