Suppose I want to plot a function as follows:
def f(t):
return 1/(1-t)
def analytic_plot():
t1 = np.arange(0, 1, 0.01)
plt.figure()
plt.plot(t1, f(t1))
plt.show()
This works fine. But suppose that for arguments sake, i want the x-axis not labled as 0-1 but 0-100. In my mind it should be like this:
t2 = [x * 100 for x in t1]
But if we replot it now as:
plt.plot(t2, f(t1))
it doesn't at all do what I expect. Aren't we still mapping one element at a time from t2 to the value of f(t1)?



