Thank you for your help. I would expect FuelTypeNum to make up the legend. But in the legend there is an extra value of called '3' and in the chart there is an extra FuelTypeNum.
code: ggplot(data=tempTable, aes(x=Bands8, y=AvailableMWNewFormat, fill=FuelTypeNum)) + geom_bar(position="stack", stat="identity") + coord_flip() Plot http://r.789695.n4.nabble.com/file/n4632552/Rplot.jpeg Data: http://r.789695.n4.nabble.com/file/n4632552/dataRtest.csv dataRtest.csv -- View this message in context: http://r.789695.n4.nabble.com/ggplot-incorrect-legend-tp4632471p4632552.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.