def build_diff(self, view): page_1 = mv.plot_page(top=5, bottom=50, left=25, right=75, view=view) page_2 = mv.plot_page(top=52, bottom=97, right=50, view=view) page_3 = mv.plot_page(top=52, bottom=97, left=50, right=100, view=view) return mv.plot_superpage(pages=[page_1, page_2, page_3])
def test_plot_2_pages(): output_name = file_in_testdir('test_plot_2_pages') png = mv.png_output(output_name=output_name) degraded_field = mv.read(data=TEST_FIELDSET, grid=[4, 4]) page1 = mv.plot_page(top=2.2, bottom=52.2, right=100) page2 = mv.plot_page(top=50) dw = mv.plot_superpage(pages=[page1, page2]) mv.setoutput(png) mv.plot(dw[0], degraded_field, dw[1], degraded_field + 50) output_name_from_magics = output_name + '.1.png' assert (os.path.isfile(output_name_from_magics)) os.remove(output_name_from_magics)
def build_stamp(self, page_num=0, layout="", view=None): if True: coast_empty = mv.mcoast( map_coastline="off", map_grid="off", map_label="off" ) empty_view = mv.geoview( page_frame="off", subpage_frame="off", coastlines=coast_empty, subpage_x_position=40, subpage_x_length=10, subpage_y_length=10, ) title_page = mv.plot_page( top=0, bottom=5, left=30, right=70, view=empty_view ) r, c = self._grid_row_col(page_num=page_num, layout=layout) pages = mv.mvl_regular_layout(view, c, r, 1, 1, [5, 100, 15, 100]) pages.append(title_page) return mv.plot_superpage(pages=pages)
def build_xs(self, line, map_view): xs_view = mv.mxsectview( line=line, bottom_level=1000, top_level=150 # wind_perpendicular : "off", # wind_parallel :"on", # wind_intensity :"off" ) page_1 = mv.plot_page(top=35 if map_view is not None else 5, view=xs_view) if map_view is not None: page = mv.plot_page(top=5, bottom=35, view=map_view) return mv.plot_superpage(pages=[page_1, page]) else: return mv.plot_superpage(pages=[page_1])
def _build_grid(self, rows=1, columns=1, view=None): assert rows >= 1 and columns >= 1 if rows == 1 and columns == 1: return mv.plot_superpage(pages=[mv.plot_page(view=view)]) else: return mv.plot_superpage( pages=mv.mvl_regular_layout( view, columns, rows, 1, 1, [5, 100, 15, 100] ) )