I am trying to find a way to visualise the x-axis labels more clearly if you have crowded data. Making the labels vertical does good job. Is it possible to arrange the labels alternating to let's say the axis, so that spaces between the labels become clearer.
Example:
name = replicate(100, expr = paste(sample(LETTERS, 5), collapse = ""))
value = sample(1:2000, 100, replace = TRUE)
df = data.frame(name, value)
barplot using library(ggplot2)
ggplot(df, aes(name, value)) + geom_bar(stat = "identity") + theme(axis.text.x = element_text(angle = 90, hjust = 1))
It is still crowded. How can I arrange the labels alternating both up and down of the x-axis or a line below it.