use matplotlib graph