I am trying to generate a histogram of below data (Data comes from a sqlserver database)
> head(Data)
value temp
1 47.34848 97
2 45.95588 97
3 47.34848 97
4 46.99248 97
5 46.64179 97
6 46.29630 97
I tried qplot in ggplot with dodging. I was hoping i will get multiple histogram, but i got a single histogram
> qplot(value, data=Data, geom = "bar", fill = temp, position = "dodge")
To verify that i have two different temperatures in Data, i generated a histogram of temp
> qplot(temp,data=Data,geom="bar")

I also generated a histogram of the value and it is same as the first plot above.
To verify my commands, i generated a graph with some sample data and the command i am using seems to be ok
> head(SampleData)
val cat
1 1 a
2 2 a
3 3 a
4 4 a
5 4 a
6 2 a

Please help me find the issue
The variable used to define the two groups should be a
factor.