How do I get the state name to show in x-axis instead of the numbers and how can I display the chart with different colors. margin of victory by state:

How do I get the state name to show in x-axis instead of the numbers and how can I display the chart with different colors. margin of victory by state:

You can use the xticks function to change the x-axis labels. In your case, this would look something like this:
plt.xticks(locs=list(range(37)), labels=[list of state names goes here])
Documentation here.