Modification of the legend of a graph