这有点“ hacky”,但是如果您知道界限(看起来像是与磁偏角相对应的样子),则可以执行以下 *** 作:
import matplotlib.pyplot as pltimport numpy as npfig = plt.figure()ax = fig.add_axes([0.1,0.1,0.8,0.8], polar=True)# ax.invert_yaxis()ax.set_theta_zero_location('N')ax.set_rlim(90, -45, 1)# Note: you must set the end of arange to be slightly larger than 90 or it won't include 90ax.set_yticks(np.arange(-45, 91, 15))ax.set_yticklabels(ax.get_yticks()[::-1])ax.plot([0,10,20], 90-np.array([12,13,14]), linestyle='', marker='.')fig.show()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)