create function for plotting