1
我想用matplotlib繪製極座標圖,並且想要執行以下操作:a)用科學記數法顯示刻度標記 b)以指定的時間間隔顯示半徑圓。matplotlib極座標圖科學記數法
誰能給我如何做一個建議)和b)低於
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111, polar=True)
theta =[np.pi/3, np.pi/3]
theta2 =[np.pi/6, np.pi/6]
r = [0.0, 8.0e-04]
r2 = [0.0, 7.0e-04]
ax.plot(theta, r, 'r-', label ='Observed')
ax.plot(theta2, r2, 'b-', label ='Simulated')
ax.grid(True)
ax.legend(loc='upper center', bbox_to_anchor=(0.5, 1.25),
ncol=3, fancybox=True, shadow=True)
plt.show()
你的'legend'調用不工作,因爲'ncol'。 – Adobe 2014-09-05 05:05:21
@Adobe你是對的傳說調用並不完全正確,但是當我嘗試它時,傳說實際上存在,但它在可見圖形之外,如果將圖形調整爲小圖形,則開始看到它。 – Ajean 2014-09-05 15:28:25