graph visualization with matplotlib