correct distribution plotting script to do correct legends