modify_label_pieces function

Modify pieces of row and column labels