find_plot_max function

Find maximum value for plotting.