remove nodes from legend