Variables | |
float | box_margin_left = 0.07 |
float | box_margin_bot = 0.08 |
float | box_width = 0.75 |
float | box_height = 0.83 |
list | magtypes = ['WSO','ADAPT','NSO'] |
string | magpath = '/home/indurain/local_swdatabase/dir.data/DATA_OBS/Maps/MAGCARR/WSO/wso_wso_CR2161.txt' |
tuple | map2D = interface_read_map2D.read(magtype,magpath) |
tuple | positions_sc = module_timespace.Coordinate() |
HCS layer Figure fig, ax = plt.subplots(1, 1) ax.set_position([box_margin_left,box_margin_bot,box_width,box_height]) #sub.set_position([left, bottom, width, height]) Contour plt.contour(X,Y,Z,levels) len(X) = M, len(Y) = N, Z = array-like(N,M), levels = [array-like] label_hcs = 'HCS' hcs = module_plot.plot_hcs(ax,map2D,[0. More... | |
string | label_visible_disk = 'Visible disk' |
tuple | visible_disk = module_plot.plot_visible_disk(ax,positions_sc,[0.],[label_visible_disk],'black') |
list | handle_visible_disk = handles[labels.index(label_visible_disk)] |
tuple | legend_visible_disk = ax.legend(handles=[handle_visible_disk],fontsize=10,bbox_to_anchor=(1,0.2),loc='center left') |
Legend HCS legend_hcs = ax.legend(handles=[handle_hcs],fontsize=10,bbox_to_anchor=(1,0.3),loc='center left') legend_hcs.draw_frame(False) #No frame ax.add_artist(legend_hcs) #Add this legend to the plot Legend Visible disk. More... | |
tuple | fig = Figure("800px", "600px",SVG('layer_'+ magtype.lower() + '.svg').scale(1./0.72),SVG("layer_vd.svg").scale(1./0.72),SVG("layer_legend.svg").scale(1./0.72),SVG("layer_axis.svg").scale(1./0.72)) |
float test_image_svg.box_height = 0.83 |
float test_image_svg.box_margin_bot = 0.08 |
float test_image_svg.box_margin_left = 0.07 |
float test_image_svg.box_width = 0.75 |
tuple test_image_svg.fig = Figure("800px", "600px",SVG('layer_'+ magtype.lower() + '.svg').scale(1./0.72),SVG("layer_vd.svg").scale(1./0.72),SVG("layer_legend.svg").scale(1./0.72),SVG("layer_axis.svg").scale(1./0.72)) |
list test_image_svg.handle_visible_disk = handles[labels.index(label_visible_disk)] |
string test_image_svg.label_visible_disk = 'Visible disk' |
tuple test_image_svg.legend_visible_disk = ax.legend(handles=[handle_visible_disk],fontsize=10,bbox_to_anchor=(1,0.2),loc='center left') |
Legend HCS legend_hcs = ax.legend(handles=[handle_hcs],fontsize=10,bbox_to_anchor=(1,0.3),loc='center left') legend_hcs.draw_frame(False) #No frame ax.add_artist(legend_hcs) #Add this legend to the plot Legend Visible disk.
string test_image_svg.magpath = '/home/indurain/local_swdatabase/dir.data/DATA_OBS/Maps/MAGCARR/WSO/wso_wso_CR2161.txt' |
list test_image_svg.magtypes = ['WSO','ADAPT','NSO'] |
tuple test_image_svg.map2D = interface_read_map2D.read(magtype,magpath) |
tuple test_image_svg.positions_sc = module_timespace.Coordinate() |
HCS layer Figure fig, ax = plt.subplots(1, 1) ax.set_position([box_margin_left,box_margin_bot,box_width,box_height]) #sub.set_position([left, bottom, width, height]) Contour plt.contour(X,Y,Z,levels) len(X) = M, len(Y) = N, Z = array-like(N,M), levels = [array-like] label_hcs = 'HCS' hcs = module_plot.plot_hcs(ax,map2D,[0.
],[label_hcs],'red') Just for legend Get all artists on plot, and their label handles, labels = ax.get_legend_handles_labels() Find label_contour handle_hcs = handles[labels.index(label_hcs)] Plot ax.axis([module_plot.xtick_loc[0],module_plot.xtick_loc[-1],module_plot.ytick_loc[0],module_plot.ytick_loc[-1]]) ax.set_axis_off() fig.set_size_inches(8,6) fig.set_dpi(100) fig.savefig('layer_hcs_' + magtype.lower() + '.svg',format="svg",transparent=True)
tuple test_image_svg.visible_disk = module_plot.plot_visible_disk(ax,positions_sc,[0.],[label_visible_disk],'black') |