wrap diagrams in figure tags