I'm looking for a very simple example of taking a Django QuerySet and then generating a graph using matplotlib. All the examples I've found have hard-coded data values or they don't really explain what they are doing. I thought this would be a good question for others as well.
Let me set the stage with a very simple example so this is very easy to follow for me and for other n00bs. ;-)
class Animals(models.Model):
cats = models.PositiveSmallIntegerField
dogs = models.PositiveSmallIntegerField
created = created = models.DateTimeField(auto_now_add=True)
datatograph = Animals.objects.all()
How do I get datatograph into the right format so I can pass it to matplotlib and end up with two an X axis of integers, y axis of dates and a line for dogs and a line for cats.
Thank you!