Fixed issues in plot_pattern with binning
Fixed issues in plot_pattern with binning (2)