A PGF backend for diagrams