I fixed the legend issue for the plots