def test2(): aia = Map(sunpy.AIA_171_IMAGE) fig = plt.figure() ax = plt.subplot(111) aia.plot() plt.colorbar() aia.draw_limb() plt.show()
c_map.set_colors(1, c_map_cm) 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
# Create the composite map 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")