how to write a plot