How to force integer tick labels

This should be simpler: (from https://scivision.co/matplotlib-force-integer-labeling-of-axis/) import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator #… ax = plt.figure().gca() #… ax.xaxis.set_major_locator(MaxNLocator(integer=True)) Read the official docs: https://matplotlib.org/stable/api/ticker_api.html#matplotlib.ticker.MaxNLocator

Changing the tick frequency on the x or y axis

You could explicitly set where you want to tick marks with plt.xticks: plt.xticks(np.arange(min(x), max(x)+1, 1.0)) For example, import numpy as np import matplotlib.pyplot as plt x = [0,5,9,10,15] y = [0,1,2,3,4] plt.plot(x,y) plt.xticks(np.arange(min(x), max(x)+1, 1.0)) plt.show() (np.arange was used rather than Python’s range function just in case min(x) and max(x) are floats instead of ints.) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)