I have points
x = [1000, 15000, 28000, 70000, 850000]
y = [10000, 20000, 30000, 10000, 50000]
and I get this graphic
How can I set my own values on x axis?
Example : 1000, 15000, 28000, 70000, 850000
I Wanna get like this:
I have points
x = [1000, 15000, 28000, 70000, 850000]
y = [10000, 20000, 30000, 10000, 50000]
and I get this graphic
How can I set my own values on x axis?
Example : 1000, 15000, 28000, 70000, 850000
I Wanna get like this:
Based on your graphic, you actually want the points to be spaced equally in
x
and then to set the equally spaced ticks as your customx
array.The code below will plot them equally (it actually plots them at [0, 1, 2, 3, ...]). It then places ticks at the positions (0, 1, 2, 3,...) with the values given by
x
using theplt.xticks
function.