put the legend of the plot into latex file