Hi @shubhangi318 , If i understand well you need something like that
library(tidyverse)
# this for make a new classification according of you request
newdf <- newdf %>%
mutate(donation2 = case_when(
donation <=225.16 ~ "A",
donation <=100437.6 ~ "B",
donation <=200650.1 ~ "C",
donation <=300862.6 ~ "D",
donation <=401075.1 ~ "E",
donation <=501287.5 ~ "G",
donation <=601500 ~ "H"))
# Next the plot
ggplot(data=newdf, aes(x=donation, y=reorder(company, +donation), fill=donation2)) +
geom_bar(stat="identity") +
scale_x_continuous(breaks = c(225.16, 100437.6, 200650.1, 300862.6, 401075.1, 501287.5, 601500)) +
scale_fill_manual(values=c("purple", "blue", "green", "yellow", "orange", "red", "pink"))+
theme(legend.position = "none")