本文整理匯總了Python中sunpy.map.Map.draw_grid方法的典型用法代碼示例。如果您正苦於以下問題:Python Map.draw_grid方法的具體用法?Python Map.draw_grid怎麽用?Python Map.draw_grid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sunpy.map.Map
的用法示例。
在下文中一共展示了Map.draw_grid方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Map
# 需要導入模塊: from sunpy.map import Map [as 別名]
# 或者: from sunpy.map.Map import draw_grid [as 別名]
c_map = Map(sun_image, fp_map, best_long_score_map, composite=True)
# Create the figure
plt.close('all')
figure = plt.figure()
axes = figure.add_subplot(111)
if for_paper:
observation = r"AIA {:s}".format(mc[0].measurement._repr_latex_())
title = "wave fit map\n{:s}".format(observation)
image_file_type = 'png'
else:
title = "{:s} ({:s})".format(observation_date, wave_name)
image_file_type = 'png'
ret = c_map.plot(axes=axes, title=title)
c_map.draw_limb(color='c')
c_map.draw_grid(color='c')
# Add a small circle to indicate the estimated epicenter of the wave
ip = SkyCoord(transform_hpc2hg_parameters['epi_lon'],
transform_hpc2hg_parameters['epi_lat'],
frame='heliographic_stonyhurst').transform_to(sun_image.coordinate_frame)
ccc = Circle((ip.Tx.value, ip.Ty.value), radius=50, edgecolor='w', fill=True, facecolor='c', zorder=1000)
axes.add_patch(ccc)
# Set up the color bar
nticks = 6
timestamps_index = np.linspace(1, len(timestamps)-1, nticks, dtype=np.int).tolist()
cbar_tick_labels = []
for index in timestamps_index:
wpm_time = timestamps[index].strftime("%H:%M:%S")
cbar_tick_labels.append(wpm_time)
示例2: len
# 需要導入模塊: from sunpy.map import Map [as 別名]
# 或者: from sunpy.map.Map import draw_grid [as 別名]
c_map.set_alpha(1, 0.8)
# Create the figure
plt.close('all')
figure = plt.figure()
axes = figure.add_subplot(111)
if for_paper:
observation = r"AIA {:s}".format(mc[0].measurement._repr_latex_())
title = "wave progress map\n{:s}".format(observation)
image_file_type = 'eps'
else:
title = "{:s} ({:s})".format(observation_date, wave_name)
image_file_type = 'png'
ret = c_map.plot(axes=axes, title=title)
c_map.draw_limb()
c_map.draw_grid()
# Set up the color bar
nticks = 6
timestamps_index = np.linspace(1, len(timestamps)-1, nticks, dtype=np.int).tolist()
cbar_tick_labels = []
for index in timestamps_index:
wpm_time = timestamps[index].strftime("%H:%M:%S")
cbar_tick_labels.append(wpm_time)
cbar = figure.colorbar(ret[1], ticks=timestamps_index)
cbar.ax.set_yticklabels(cbar_tick_labels)
cbar.set_label('time (UT) ({:s})'.format(observation_date))
cbar.set_clim(vmin=1, vmax=len(timestamps))
# Show the figure
plt.savefig(img_filepath + '_wave_progress_map.{:s}'.format(image_file_type))
示例3: Map
# 需要導入模塊: from sunpy.map import Map [as 別名]
# 或者: from sunpy.map.Map import draw_grid [as 別名]
import matplotlib.pyplot as plt
from sunpy.map import Map
import sunpy.data.sample as s
import numpy as np
aia = Map(s.AIA_171_IMAGE)
fig, axs = plt.subplots(1,2)
aia.plot(axes=axs[0])
aia.draw_grid()
r = [11.52, 10.42, 6.14, 3.64, 2.75]
e = [10, 20, 30, 40, 50]
pixel_size = 3.4
number_of_pixels = 160
center = np.array([461, 303])
line_color = 'w'
rect = plt.Rectangle(center - pixel_size * number_of_pixels/2., pixel_size * number_of_pixels, pixel_size * number_of_pixels, fill=False, color=line_color)
ax[0].add_artist(rect)
rect = plt.Rectangle(center - pixel_size/2., pixel_size, pixel_size, fill=False, color=line_color)
ax[0].add_artist(rect)
for radius, energy in zip(r,e):
circle = plt.Circle(center, radius=radius*60, fill=False, label=str(energy), color=line_color)
ax[0].add_artist(circle)
plt.colorbar()
plt.legend()