And I want to remove that small vertical tick that I guess is axis.line.y prolongation that goes below y=0.
ggplot() +
geom_col(data=a, aes(x = X, y = M, fill = X), width = 0.75, position = position_dodge(0.1), colour = "black", size = 1) +
labs(title = "XYZ") + xlab("ABCDEF") + ylab("Value") +
coord_cartesian(ylim = c(0, NA)) +
geom_errorbar(data=a, aes(x = X, y = M, ymin = M, ymax = max), width=0.4, size=0.5) +
geom_point(data = df2, aes(x = X, y = Y), shape = 21, size = 2, stroke = 1, colour = "black", fill = "white", position = position_jitter(height = .2, width = .2)) +
scale_fill_manual(values = colors) +
theme(
aspect.ratio = 5/4,
axis.line.y.left = element_line(color="black", size = 1),
#axis.line.x = element_line(color="black", size = 1),
axis.text.x = element_text(size = 20, family = "Helvetica", color = "black", angle=45, hjust=1),
axis.text.y = element_text(size = 20, family = "Helvetica", color = "black", angle=0, hjust=1),
axis.title.x.bottom = element_text(size = 20, family = "Helvetica", angle=0, margin = margin(t=30), hjust=NULL),
axis.title.y = element_text(size = 25, family = "Helvetica", color = "black", angle=0, margin = margin(r = 30), vjust = 0.5),
plot.title = element_text(size = 30, family = "Helvetica", color = "black", margin = margin(b = 30), hjust = 0.5 ),
axis.ticks.y = element_line(size = 1.5),
axis.ticks.length.y = unit(10,"pt")
) +
geom_hline(yintercept=0, linetype="solid", colour = "black", size=1)
#geom_vline(xintercept=0, linetype="solid", colour = "black", size=1)
That's my code. As you can see by the # I tried using geom_vline instead of axis.line.y but then I didn't get any line (no error). I'd apreciate any help with getting rid of that unnecessary prolongation.