I have a D data frame that looks like this:
Track <- c(0,0,0,-1,1,1) Length <- c(1,1,2,1,3,1) Legend <- c("A","B","A","C","B","C") D <- data.frame(Track,Length,Legend) D
I am currently using this code to build it:
ggplot(Z, aes(x=Track, y=Length, fill=Legend)) + geom_bar(stat='identity') + geom_point() + expand_limits(x=0,y=0) + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background = element_blank(), axis.line = element_line(colour = "black"))
And the graph is as follows: 
However, I want to assign the color white to variable B. Is this manipulation possible? In addition, I use dummy data for simplicity in this article. The actual data that I will use may contain 10 or more variables in the Legend section, so recording every hex color does not look like a clean option.
thanks for the help
source share