correction of normalization in plot_pattern()