fixed threshold bug for plot_map