Plot y against x, put the x-axis ticks at positions, and replace the
numbers under them with the strings in names.
Return the Axes. The positions have to be set before the labels: labelling ticks you have not placed leaves the labels attached to whatever matplotlib chose.