try to build matplotlib on fedora-18, build fails with
... png: no [pkg-config information for \'libpng\' could not be found.] ...
Under Cent Os 7, I was able to install matplotlib after installing libpng-static. Please try libpng-static as well as libpng-devel.