I have this code:
library(ggplot2)
ggplot(data = bayes, aes(x = Order, y = value, fill=key, color=key)) +
geom_rect(aes(xmin = Order, xmax = dplyr::lead(Order), ymin= -Inf, ymax =Inf, colour=Summary),
alpha=0.1) +
geom_line(size=0.5) +
geom_point() +
xlab("Bayesian combination") +
ylab("Bayesian probability") +
theme(legend.position="none") +
ylim(0,1) +
xlim(1,126)
Just for you to know my data structure:
> str(bayes)
'data.frame': 252 obs. of 5 variables:
$ Summary : chr "1 vs. 6" "1 vs. 6" "1 vs. 6" "1 vs. 6" ...
$ Combination: chr "I1 if I2CP3P4M1M2" "I2 if I1CP3P4M1M2" "C if I1I2P3P4M1M2" "P3 if I1I2CP4M1M2" ...
$ Order : int 126 125 124 123 122 121 120 119 118 117 ...
$ key : chr "Lower_XVIII_UBU" "Lower_XVIII_UBU" "Lower_XVIII_UBU" "Lower_XVIII_UBU" ...
$ value : num 1 0.35 0.93 0.73 0.95 0.32 0.88 0.13 0.93 0.84 ...
My problem is that I cannot remove the outlines and borders from the geom_rect objects, making the figure unintelligible.
As you can see, I have 5 groups represented by five colors. However, within them there are plenty subrectangles each with their own border. I would like to remove all borders in the chart, so, where is the problem in the code?