code of second plot