m file for plotting