Metview's documentation is now on readthedocs!

Download source and data


Taylor diagram_TEST
#Metview Macro

#  **************************** LICENSE START ***********************************
# 
#  Copyright 2019 ECMWF. This software is distributed under the terms
#  of the Apache License version 2.0. In applying this license, ECMWF does not
#  waive the privileges and immunities granted to it by virtue of its status as
#  an Intergovernmental Organization or submit itself to any jurisdiction.
# 
#  ***************************** LICENSE END ************************************
# 

# define data values
val_x = [0.2,0.4,0.6,0.7]
val_y = [0.1,0.3,0.5,0.8]

# define the Taylor diagram grid 
grid = mtaylor(
    taylor_primary_grid_increment : 0.1,
    taylor_secondary_grid : "on",
    taylor_secondary_grid_increment : 0.1,
    taylor_secondary_grid_line_colour : "RGB(0.28,0.58,0.11)",
    taylor_secondary_grid_line_style : "dash",
    taylor_secondary_label_colour : "RGB(0.33,0.58,0.16)"
)

# define the view
view = cartesianview(
    map_projection  : "taylor",
    page_frame      : "off",
    subpage_frame   : "off",
    taylor_grid     : grid
)

# define the input visualiser
vis = input_visualiser(
    input_x_values : val_x,
    input_y_values : val_y
)

# define symbol plotting
symbol = msymb(
    symbol_type         : "marker",
    symbol_marker_index : 15,
    symbol_colour       : "red",
    symbol_height       : 0.5,
    symbol_outline      : "on",
    symbol_outline_thickness : 2
)

# define the output plot file
setoutput(pdf_output(output_name : 'taylor'))

# generate the plot
plot(view, vis, symbol)
Taylor diagram_TEST
#  **************************** LICENSE START ***********************************
# 
#  Copyright 2019 ECMWF. This software is distributed under the terms
#  of the Apache License version 2.0. In applying this license, ECMWF does not
#  waive the privileges and immunities granted to it by virtue of its status as
#  an Intergovernmental Organization or submit itself to any jurisdiction.
# 
#  ***************************** LICENSE END ************************************
# 
import metview as mv

# define data values
val_x = [0.2,0.4,0.6,0.7]
val_y = [0.1,0.3,0.5,0.8]

# define the Taylor diagram grid 
grid = mv.mtaylor(
    taylor_primary_grid_increment = 0.1,
    taylor_secondary_grid = "on",
    taylor_secondary_grid_increment = 0.1,
    taylor_secondary_grid_line_colour = "RGB(0.28,0.58,0.11)",
    taylor_secondary_grid_line_style = "dash",
    taylor_secondary_label_colour = "RGB(0.33,0.58,0.16)"
)

# define the view
view = mv.cartesianview(
    map_projection  = "taylor",
    page_frame      = "off",
    subpage_frame   = "off",
    taylor_grid     = grid
)

# define the input visualiser
vis = mv.input_visualiser(
    input_x_values = val_x,
    input_y_values = val_y
)

# define symbol plotting
symbol = mv.msymb(
    symbol_type         = "marker",
    symbol_marker_index = 15,
    symbol_colour       = "red",
    symbol_height       = 0.5,
    symbol_outline      = "on",
    symbol_outline_thickness = 2
)

# define the output plot file
mv.setoutput(mv.pdf_output(output_name = 'taylor'))

# generate the plot
mv.plot(view, vis, symbol)