Auto-generate the plot.