The ubuntu repositories do not contain the most recent versions. You can use pip
to install the latest versions.
If you don't have pip installed, use sudo apt-get install pip
to install it.
Then use
sudo pip install --upgrade matplotlib
to upgrade matplotlib to the most recent version.
In case, you get an error message like
Running setup.py egg_info for package matplotlib
The required version of distribute (>=0.6.28) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U distribute'
execute
easy_install -U distribute
and try sudo pip install --upgrade matplotlib
again.