I am using ggplot in python and just trying to make a basic bar chart. For reasons I don't understand, the bar heights are corresponding to counts of variable names, rather than the actual variables.
Simple example
pattern = pd.Series(['standard', 'woolly', 'brown', 'spotted', 'red', 'wheat', 'grey'], dtype = 'category')
population = pd.Series([12, 2, 7, 3, 2, 4,5])
patternCount = pd.DataFrame({'color':pattern, 'population':population})
ggplot(aes(x = 'attribute', y = 'population'), data = animalCounts) +\
geom_bar(stat = "identity")
Gives me a bar chart that looks like this.
I know these are counts, rather than just the number one, since if I have duplicate of any of these names, that variable shows as "2".
I presume I am making some really simple mistake here. Thanks for any help.
Edit: As per Ron Norris's request, here is the same figure, but scaled to 12, rather than 1.