本文整理汇总了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)
示例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
###############################################################################