我有观测到的震级数据。我想找出量值的检测完备性。我想在python中像这样绘制图形。
如何绘制我的data的检测完整性和大小
import numpy as np
from astropy.table import Table
data = Table.read('magnitude_data.fits')
plt.hist(data['NB921'], bins=30)
请告诉我怎么画这样的图。
发布于 2021-06-07 16:01:24
我不确定你的问题是什么,但试试这个:
import matplotlib.pyplot as plt
Data = [1,2,3,4,5,6,7,8,9,10]
Other_Data = [9.8,12,8,7.2,6.9,7,6.5,6.2,5.5,6.3]
plt.plot(Data, Other_Data, color='red', marker='o')
plt.title('Data Vs Other_Data', fontsize=14)
plt.xlabel('Data', fontsize=14)
plt.ylabel('Other_Data', fontsize=14)
plt.grid(True)
plt.show()
代码创建折线图,并在 data 和other_data中绘制数据。
另外,尝试从该文件中提取数据并将其放入这些字符串中。
https://stackoverflow.com/questions/65409499
复制相似问题