I\'m an ubuntu 16.4 user and I installed anaconda3 and using both python2 and python3 kernels.
>>>jupyter kernelspec list Available kernels: pyt
When using python3 version of jupyter (pip3 install jupyter), matplotlib has to be installed using pip3: pip3 install matplotlib
pip3 install jupyter
pip3 install matplotlib