Fix Python – How to force the Y axis to only use integers

I’m plotting a histogram using the matplotlib.pyplot module and I am wondering how I can force the y-axis labels to only show integers (e.g. 0, 1, 2, 3 etc.) and not decimals (e.g. 0., 0.5, 1., 1.5, 2. etc.).
I’m looking at the guidance notes and suspect the answer lies somewhere around matplotlib.pyplot.ylim but so far I can only find stuff that….

Fix Python – Aligning rotated xticklabels with their respective xticks

Check the x axis of the figure below. How can I move the labels a bit to the left so that they align with their respective ticks?
I’m rotating the labels using:
ax.set_xticks(xlabels_positions)
ax.set_xticklabels(xlabels, rotation=45)

But, as you can see, the rotation is centered on the middle of the text labels. Which makes it look like they are….