子图拟合图像的放大部分?

时间:2019-04-20 11:25:33

标签: python matplotlib astropy fits

我正在尝试打开一个天文图像并将其绘制为图形,这是由我的代码完成的,但是,我试图将fits文件的一部分放大为同一图形上的子图。

import matplotlib.pyplot as plt
from astropy.visualization import astropy_mpl_style
plt.style.use(astropy_mpl_style)
from astropy.utils.data import get_pkg_data_filename
from astropy.io import fits
image_file = get_pkg_data_filename('814wmos.fits')

image_data = fits.getdata('814wmos.fits', ext=0)
plt.figure()
plt.imshow(image_data, cmap='gray')

这给了我拟合的文件,并对其进行了绘制,而没有在坐标上“放大” [350:450,500:600]显示/告诉我的很少。如何将该区域作为子图绘制为原始图像旁边的子图,该子图的大小相同(对于相同的轴放大)?

0 个答案:

没有答案