This recipe will show how to display multiple lines in a graph.
Displaying multiple lines
Getting ready
We need to install matplotlib in our virtual environment:
$ echo "matplotlib==2.2.2" >> requirements.txt
$ pip install -r requirements.txt
If you are using macOS, it's possible that you get an error like this—RuntimeError: Python is not installed as a framework. See the matplolib documentation on how to fix it: https://matplotlib.org/faq/osx_framework.html.
How to do it...
- Import matplotlib:
>>> import matplotlib.pyplot as plt
- Prepare...