code to plot correlation