Added log plotting to pairwise_plot.