fix legend and bin