Plotting¶
See also : https://confluence.ecmwf.int/display/MAGP/Reference+guide
Todo
Introduce advance plotting options
import climetlab as cml
# cml.settings.set("plotting-options", {'dump_yaml': True})
dataset = cml.load_dataset("example-dataset")
data = dataset[0]
cml.plot_map(data, foreground=False)
cml.plot_map(data, foreground=True)
cml.plot_map(data, foreground="example-foreground")
cml.plot_map(
data,
foreground=dict(
map_grid=False,
map_label=False,
map_grid_frame=True,
map_grid_frame_thickness=5,
map_boundaries=True,
),
)
# Partial update of the current `foreground`
# How to do is still to be decided
# Option 1
cml.plot_map(
data,
foreground={
"+map_rivers": True,
"+map_cities": True,
"+map_label": True,
"-map_boundaries": None,
},
)
# Option 2
cml.plot_map(
data,
foreground={
"set": {"map_rivers": True, "map_cities": True, "map_label": True},
"clear": ["map_boundaries"],
},
)
# Option 3
cml.plot_map(
data,
foreground={
"+": {"map_rivers": True, "map_cities": True, "map_label": True},
"-": ["map_boundaries"],
},
)
# Option 4
cml.plot_map(
data,
update_foreground={
"map_rivers": True,
"map_cities": True,
"map_label": True,
"map_boundaries": None,
},
)
# Option 5
cml.plot_map(
data,
update={
"foreground": {
"map_rivers": True,
"map_cities": True,
"map_label": True,
"map_boundaries": None,
},
},
)
import climetlab as cml
cml.plotting_options(width=400, foreground=False)
Projections¶
file_content Traceback (most recent call last):
- File “/home/docs/checkouts/readthedocs.org/user_builds/climetlab/checkouts/0.16.1/climetlab/sphinxext/module_output.py”, line 40, in run
module.execute(*args)
- File “/home/docs/checkouts/readthedocs.org/user_builds/climetlab/checkouts/0.16.1/climetlab/sphinxext/file_content.py”, line 22, in execute
print(“.. code-block::”, LANGUAGES[ext])
KeyError: ‘.YAML’
See mmap.
Styles¶
TODO
Layers¶
See mcoast.
TODO