I'm relatively new to ggplot, so I apologize if this is easy, but I couldn't find anything online.
I want to display 29 boxplots (numbered 1.1 to 4.0) next to each other in ggplot2 (which I can do) but once I make the tick label the appropriate size (which I can do), the labels overlap and I only want a few (1.5, 2, 2.5 etc) anyways. How can I remove only some of the tick labels? Also, anyway I can include a blank tick mark at 1.0 so my tick labels are nice, round numbers?
My data is list which I 'melted' since each boxplot has a different number of observations.
My current code:
list = list(data11, data12, ... data39, data40) # Elipse denotes the rest of the sequence
df = melt(list)
ggplot(df, aes(factor(variable), value)) +
geom_boxplot(outlier.size=1.5, colour="black") +
xlab("Xlabel") +
ylab("Ylabel") +
theme_classic() +
theme(
axis.text.x = element_text(size=12),
axis.text.y = element_text(size=12),
axis.title.x = element_text(size=14),
axis.title.y = element_text(size=14, angle=90),
axis.line = element_line(size=0.75)
)