Apart of the obvious solution of upgrading your code to work with the new versions of Matplotlib, you could perfectly install matplotlib in a virtual environment. For that you need to install the virtualenv package, then create your virutalenv (I will make it short and explain at the end):
mkdir matplotlib_1.1.1
cd matplotlib_1.1.1
virtualenv env
env/bin/pip install numpy
env/bin/pip install https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.1.1.tar.gz
If you used virtualenv/pip most of this isn't new. First we create and move to a new directory, then we create the virtual environment in the env directory. We proceed to install numpy which is one of the dependencies of matplotlib, and finally we manually select and install the sources of matplotlib with the version of our preference.
You can now use env/bin/python to open a interactive python shell, or run source env/bin/activate to change temporally the default python binaries.
Ah, btw, this doesn't require you to remove your already installed version of matplotlib, if you don't want to.
More reading about pip and virtualenv as well as some references http://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/