python - 绘制适合图像的放大部分?
问题描述
我正在尝试打开一个天文图像并将其绘制为图形,这是由我的代码完成的,但是,我试图将 fit 文件的一部分放大为同一图形上的子图。
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')
这给了我我的 fit 文件,并绘制它,在没有“放大”坐标 [350:450,500:600] 的情况下显示/告诉我的信息很少。如何将此区域绘制为原始图像旁边的子图,大小相同(放大相同的轴)?
解决方案
推荐阅读
- jenkins - 带有传递参数的 Jenkins 钻石依赖关系
- c# - 从 C# 将命令传递给自定义命令提示符
- c - (int ret = 0; !ret && ret !=0) 之间的差异
- python - 从 Beautifulsoup 对象加载 JSON
- sql - 将表中的所有 regexp_replaces 依次应用于一个字符串
- jsp - 如何使用相对 url 从 servlet 调用 jsp 文件
- java - 这个语句在 java jdk 1.8 (java.util.Map) 中是什么意思
- css - Windows 的选择框上的 CSS 不像 OSX 那样工作
- reactjs - 增强 react-select 到 material-ui 的布局集成
- mysql - 相同的执行路径、数据和原理图;不同的查询时间