If a legend must be displayed, the codes in the legend should be ordered to match the spatial order of their corresponding curves in the graph itself.