x , , :
dat$width <-
dat$d / sum(dat$d)
, , data.frame , , . , , - , , , , :
dat$loc <-
cumsum(dat$width) - dat$width/2
ggplot, :
ggplot(dat, aes(x= loc, y = b, fill=d, width = width)) +
geom_bar(stat="identity") +
scale_x_continuous(breaks = dat$loc
, labels = dat$a)

, .