from matplotlib import pyplot as plt
/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/colors.py:680:
MatplotlibDeprecationWarning: The is_string_like function was deprecated in version 2.1.
not cbook.is_string_like(colors[0]):
Now it's showing this error.
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern File "/home/rishabh/.local/lib/python2.7/site-packages/matplotlib/fontconfig_pattern.py", line 28, in from backports.functools_lru_cache import lru_cache ImportError: No module named functools_lru_cache
You have a MatplotlibDeprecationWarning when using the version of Matplotlib that was installed by pip. Install Matplotlib from the default Ubuntu repositories instead. Open the terminal and type:
Run the following commands in python:
Remove the matplotlib packages in the output paths of these commands. If there aren't any matplotlib packages in the output paths of these commands continue on to the next step.
Remove the matplotlib files in the .local folder.
Type
python
to start the Python interpreter and then after the prompt type:You might also like to try running the plots inline in Spyder Python IDE.
After the ipython prompt in the IPython console copy/paste the below code and press the Enter key to run it.