mpld3 interactive legend purity thresholds