[R] ggplot incorrect legend

jcrosbie james at crosb.ie
Wed Jun 6 18:29:24 CEST 2012


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.



More information about the R-help mailing list