Set location of xticks in a matplotlib scatter plot

Viewed 6211

I am trying to create a scatter plot of measurements where the x labels are WIFI channels. By default matplotlib is spacing the labels in proportion to their numerical value. However, I would like them to be spaced uniformly over the scatter plot. Is that possible?

This is basically what my plot code currently looks like: - where chanPoints is a list of frequencies and measurements is a list of measurements.

plt.scatter(chanPoints,measurements)
plt.xlabel('Frequency (MHz)')
plt.ylabel('EVM (dB)')
plt.xticks(Tchan,rotation = 90)
plt.title('EVM for 5G Channels by Site')
plt.show()

This is an example of my current output

2 Answers
Related