visualize_5_12.py 618 B

123456789101112
  1. def axis_ticks(xlm=None, ylm=None, axtickfontsize=None, axtickfontname=None, ar=None):
  2. if xlm:
  3. plt.xlim(left=xlm[0], right=xlm[1])
  4. plt.xticks(np.arange(xlm[0], xlm[1], xlm[2]), fontsize=axtickfontsize, rotation=ar, fontname=axtickfontname)
  5. else:
  6. plt.xticks(fontsize=axtickfontsize, rotation=ar, fontname=axtickfontname)
  7. if ylm:
  8. plt.ylim(bottom=ylm[0], top=ylm[1])
  9. plt.yticks(np.arange(ylm[0], ylm[1], ylm[2]), fontsize=axtickfontsize, rotation=ar, fontname=axtickfontname)
  10. else:
  11. plt.yticks(fontsize=axtickfontsize, rotation=ar, fontname=axtickfontname)