code of third plot