0
でIは経度点に対する磁束密度をプロットしたグラフである:ラベル度
を私は24.3から読み取るために、x軸が必要 - 中心に> 0 - > 335.7
matplotlib.tickerを使用して、1度ごとに30ピクセルごとに目盛りを設定しました。
import numpy as np
from astropy.io import fits
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
hdulist = fits.open('w1_subtracted_2_deg.fits')
nodisk_data, nodisk_header = hdulist[0].data, hdulist[0].header
x = range(nodisk_data.shape[1])
y = np.sum(nodisk_data, axis = 0)
ax = plt.axes()
ax.xaxis.set_major_locator(ticker.MultipleLocator(300))
ax.xaxis.set_minor_locator(ticker.MultipleLocator(30))
plt.plot(x, y)
plt.title('Longitudinal sum of flux density per steradian')
plt.xlabel(r'Galactic longitude, $\ell$')
plt.ylabel(r'Integrated flux density per steradian, $MJ.sr^{-1}$')
plt.grid(True)
plt.show()
plt.savefig('add_cols.png')
hdulist.close()
私は多分axes
クラスで、このために使用することができ、または私はハードコードにx軸ポイントのリストが必要なのか、簡単なコマンドはありますか?または、中心ピクセルを基準ピクセルとして設定し、円の周りのいずれの方向にも24.3度のプロットを付けることができますか?
を自動。 – cphlewis