Hello,
There are ways of reducing the white space between the bars but they are
not obvious. Here are the two ways that I know.
First a data example.
library(ggplot2)
library(gridExtra)
df1 <- data.frame(x = LETTERS[1:5],
y = c(40, 15, 30, 15, 20))
1. The examples that fo
HI Rui,
Thank you so much for getting back to me!
I did implement your idea (see attach):
ax.11.text <- element_text(size = 10)
ay.11.text <- element_text(size = 10)
p<-ggplot(data=toplot, aes(x=cat, y=props)) +
geom_bar(stat="identity",width=0.5, fill="steelblue")+
geom_errorbar(aes(ymin=pro
Hello,
Maybe
theme(panel.grid.major.x = element_line(size = 0.1, color = "grey"),
panel.grid.major.y = element_blank(),
panel.grid.minor = element_blank()
)
Note that if you remove the y axis grid you must set the x axis grid
explicitly.
Hope this helps,
Rui Barradas
À
I used width=0.5, to reduce bar widths and aspect.ratio = 2/1 to
reduce white spaces between bars but now text on my x axis is
overlapping and my plot is too elongated, and I don't have those 3
vertical lines trough bars.
Please advise
p<-ggplot(data=toplot, aes(x=cat, y=props)) +
geom_bar(stat
Hello,
I have this plot in attach. I was wondering how can I change my
plotting code in order to remove these gray horizontal background
lines but keep these two vertical lines? These two vertical lines
don't need to be gray, can be any other type of lines but they must be
at the same place. Also
5 matches
Mail list logo