當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。