prepares trait phenotype data for histogram plotting