In this recipe, we'll see how to draw a sales graph by drawing bars proportional to sales in different periods.
Plotting a simple sales graph
Getting ready
We can install matplotlib in our virtual environment using the following commands:
$ echo "matplotlib==2.2.2" >> requirements.txt
$ pip install -r requirements.txt
In some OSes, this may require us to install additional packages; for example, in Ubuntu it may require us to run apt-get install python3-tk. Check the matplolib docs for details.
If you are using macOS, it's possible that you'll get an error like this—RuntimeError: Python is not installed as a framework. See the matplolib documentation on how to fix it: https://matplotlib...