added legend on x-axis