Generated a diagram in png format.