python script for rendering metapost graph