def axis_ticks(xlm=None, ylm=None, axtickfontsize=None, axtickfontname=None, ar=None): if xlm: plt.xlim(left=xlm[0], right=xlm[1]) plt.xticks(np.arange(xlm[0], xlm[1], xlm[2]), fontsize=axtickfontsize, rotation=ar, fontname=axtickfontname) else: plt.xticks(fontsize=axtickfontsize, rotation=ar, fontname=axtickfontname) if ylm: plt.ylim(bottom=ylm[0], top=ylm[1]) plt.yticks(np.arange(ylm[0], ylm[1], ylm[2]), fontsize=axtickfontsize, rotation=ar, fontname=axtickfontname) else: plt.yticks(fontsize=axtickfontsize, rotation=ar, fontname=axtickfontname)