Please go to https://metview.readthedocs.io/en/latest/
Is it possible when using command line options to change the orientation of the page from landscape to portrait? Can the size of the page be altered too?
I'm creating plotted charts from BUFR observation data.
If you mean running Metview as 'metview -p' to plot your data then no, there are no options to control this. But if you're running from a Python (or Macro) script then you can adjust the page size and aspect ratio using the plot_superpage() function. You can incorporate this into a script that parses your own command-line parameters to control the layout. See:
Thanks so much for the pointer.
I'm not having much luck though. I've attached a section of the Python file I am using, can you spot anything in there I am doing incorrect?
The chart plots, but doesn't;t seem to take into account any of the page settings?
Thanks for any pointers,
# define observation plottingobsp = mv.mobs( obs_distance_apart = 0.6, obs_size = 0.25, obs_ring_size = 0.22, obs_wind = "on", obs_station_ring ="on", ) # define page layoutpg = mv.plot_superpage( layout_size = "a4", layout_orientation = "portrait" ) # define land-sea shadingcoast = mv.mcoast( map_coastline_land_shade = "off", map_coastline_resolution = "high", map_coastline_thickness = "1", map_coastline_land_shade_colour = "grey", map_coastline_sea_shade = "off", map_coastline_sea_shade_colour = "RGB(0.7903,0.8438,0.943)", map_grid_colour = "charcoal", map_grid_longitude_increment = 10 ) # add titletitle = mv.mtext(text_lines="SYNOP "+date.time_nosep+" "+date.true_date_sep, text_font_size=0.4) # define mapview = mv.geoview( map_projection="lambert", map_area_definition = "corners", area = [46.5,-15,61.5,13], coastlines = coast ) mv.setoutput(mv.pdf_output(output_name = '/Users/simonkeeling/Documents/MetView/synop_map'))
# generate plotmv.plot_superpage(pg, view, bd, obsp, title)
Could you create a ticket in the Support Portal so we can continue this there please?
Powered by a free Atlassian Confluence Open Source Project License granted to ECMWF. Evaluate Confluence today.