fix x axis and legend