完整性检测分析 星系星等图

问题描述

我有一个来自观测的震级数据。我想找到量级的检测完整性。我想在 python 中绘制这样的图形

enter image description here

如何绘制我的 data 的检测完整性和量级

import numpy as np
from astropy.table import Table

data = Table.read('magnitude_data.fits')
plt.hist(data['NB921'],bins=30)

请告诉我如何绘制这样的图。

解决方法

我不确定你的问题是什么,但试试这个:

import matplotlib.pyplot as plt
   
Data = [1,2,3,4,5,6,7,8,9,10]
Other_Data = [9.8,12,7.2,6.9,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()

该代码创建了一个折线图并绘制了dataother_data 中的数据。

此外,尝试从该文件中提取数据并将其放入这些字符串中。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...