I had a very similar issue running OS X 10.9.2 (Mavericks) and trying to get IPython 2.0 working. Here is what I did to fix it.
Step #1: Uninstall matplotlib:
$ pip uninstall matplotlib
Step #2: Use libpng v1.5.17:
$ brew update
$ cd `brew --prefix` (this brought me to /usr/local)
$ brew versions libpng
$ git checkout c22afb9 Library/Formula/libpng.rb (this gets version 1.5.17)
$ brew install libpng
$ brew switch libpng 1.5.17
$ git checkout -- Library/Formula/libpng.rb
Step #3: Use freetype v2.5.0.1:
$ cd `brew --prefix` (this brought me to /usr/local)
$ brew versions freetype
$ git checkout 6314fdb Library/Formula/freetype.rb (this gets version 2.5.0.1)
$ brew install freetype
$ brew switch freetype 2.5.0.1
$ git checkout -- Library/Formula/freetype.rb
Step #4: Re-install matplotlib:
$ CFLAGS="-I/usr/X11/include -I/usr/X11/include/freetype2" pip install matplotlib
NOTE: You may need to adjust your CFLAGS to match where you have the freetype headers installed (but I'm assuming if you had matplotlib installed earlier, you know how to re-install it again)
Now I have a working matplotlib:
$ python
Python 2.7.6 (default, Mar 3 2014, 15:04:57)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
>>>
It has fixed the matplotlib issue I was having in IPython.
I hope this works for you too.