Improve the legends fitting in the graph.