Corrected bar plot generation