analysis and drawgraph