当前位置: 首页>>代码示例>>Python>>正文


Python Map.plot_settings['cmap']方法代码示例

本文整理汇总了Python中sunpy.map.Map.plot_settings['cmap']方法的典型用法代码示例。如果您正苦于以下问题:Python Map.plot_settings['cmap']方法的具体用法?Python Map.plot_settings['cmap']怎么用?Python Map.plot_settings['cmap']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sunpy.map.Map的用法示例。


在下文中一共展示了Map.plot_settings['cmap']方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: range

# 需要导入模块: from sunpy.map import Map [as 别名]
# 或者: from sunpy.map.Map import plot_settings['cmap'] [as 别名]
yloc = np.zeros(ny)
for j in range(0, ny-1):
    yloc[j] = cy - wave_progress_map.pixel_to_data(0*u.pix, j*u.pix)[1].to(u.arcsec).value

for i in range(0, nx-1):
    for j in range(0, ny-1):
        disk[i, j] = np.sqrt(xloc[i]**2 + yloc[j]**2) < r

# Zero out the off-disk locations
if use_disk_mask:
    wpm_data = wave_progress_map.data * disk
else:
    wpm_data = wave_progress_map.data
wp_map = Map(wpm_data, wave_progress_map.meta).rotate(angle=angle)
wp_map.plot_settings['norm'] = ImageNormalize(vmin=1, vmax=len(timestamps), stretch=LinearStretch())
wp_map.plot_settings['cmap'] = c_map_cm
wp_map.plot_settings['norm'].vmin = 1

# Create a composite map with a colorbar that shows timestamps corresponding to
# the progress of the wave.
# TODO: make the zero value pixels completely transparent

# Observation date
observation_date = mc[0].date.strftime("%Y-%m-%d")

# Create the composite map
c_map = Map(mc[0], wp_map, composite=True)

# Observational data map
c_map.set_colors(0, cm.gray_r)
开发者ID:wafels,项目名称:eitwave,代码行数:32,代码来源:swave_characterize.py

示例2: Map

# 需要导入模块: from sunpy.map import Map [as 别名]
# 或者: from sunpy.map.Map import plot_settings['cmap'] [as 别名]
                               epi_lat=transform_hpc2hg_parameters['epi_lat'])
hlm_map_cm = cm.gray
hlm_map_cm.set_over(color='r', alpha=1.0)
hlm_map.plot_settings['cmap'] = hlm_map_cm


###############################################################################
# Create a map holding the best Long Score map only
#
seg = hlm_map.data > 100.0
best_long_score = np.zeros_like(hlm_map.data)
best_long_score[seg] = 1.0
best_long_score_map = Map((best_long_score, hlm_map.meta))
best_long_score_map_cm = cm.winter
best_long_score_map_cm.set_under(color='w', alpha=0)
best_long_score_map.plot_settings['cmap'] = best_long_score_map_cm
best_long_score_map.plot_settings['norm'] = ImageNormalize(vmin=0.5, vmax=1, stretch=LinearStretch())


###############################################################################
# Find the locations of the wave progress map.  This is stage 1 of the AWARE
# algorithm.
#
wp_map = wave_progress_map.rotate(angle=angle)
wp_map.plot_settings['norm'] = ImageNormalize(vmin=1, vmax=len(timestamps), stretch=LinearStretch())
wp_map_cm = cm.plasma
wp_map_cm.set_under(color='w', alpha=0)
wp_map.plot_settings['cmap'] = wp_map_cm


###############################################################################
开发者ID:wafels,项目名称:eitwave,代码行数:33,代码来源:swave_characterize3.py


注:本文中的sunpy.map.Map.plot_settings['cmap']方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。