refactored the legend line for the resource plot