I am trying to make these plots by dodging points. The points radius differ by size. Ideally, there have to be four points in each "coordinate" as indicated by the dataframe. The didge does not seem to work for two of the points. I tried changing the width to 5 but I can't see the points. Any clue on what's going on?
library(ggplot2)
set.seed(123)
species <- rep(c("A","B","C","D"), each = 5)
x.axis <- rep(c(0.5, 0.5, 1, 1,0.75), each = 4)
y.axis <- rep(c(0.5, 1, 1, 0.5,0.75), each = 4)
value <- c(1,2,10,3,4,5,4,3,2,3,6,5,10,4,5,17,1,10,13,3)
data <- data.frame(specie,value, x.axis, y.axis)
# 2D plots
ggplot(data, aes(x = x.axis, y = y.axis, color = value, size = value)) +
theme_classic() +
geom_point(aes(fill = species, color = species), alpha = 0.7,position = position_dodge(width = 0.05)) +
theme(text=element_text(size=10, family="Arial", color = "black")) +
theme(aspect.ratio = 10/10) +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_rect(colour = "black", size=1)) +
theme(axis.title.y = element_text(margin = margin(t = 0, r = 0, b = 0, l = 0)))

