generate medi to display graphs