I\'m aware that it\'s possible to change axis labels by setting them manually. (E.g.: Modify tick label text)
However, this obviously only works if you know what lab
If I truly understand your question you are looking for function formatter from matplotlib.ticker:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import ticker
# I added 'y' to fit second argument (position) of FuncFormatter
tick_to_date = lambda x,y: ("day " + str(x))
x = np.array([27, 38, 100, 300])
y = np.array([0.5, 2.5, 1.0, 0.8])
plt.scatter(x, y)
ax = plt.gca()
# tick_to_date will affect all tick labels through MyFormatter
myFormatter = ticker.FuncFormatter(tick_to_date)
# apply formatter for selected axis
ax.xaxis.set_major_formatter(myFormatter)
plt.show()