figanos package#
Outils pour produire des graphiques informatifs sur les impacts des changements climatiques.
Subpackages#
- figanos.matplotlib package
- Submodules
- figanos.matplotlib.plot module
- figanos.matplotlib.utils module
TERMS
add_cartopy_features()
add_features_map()
categorical_colors()
check_timeindex()
convert_scen_name()
create_cmap()
custom_cmap_norm()
empty_dict()
fill_between_label()
find_logo()
get_array_categ()
get_attributes()
get_localized_term()
get_mpl_styles()
get_rotpole()
get_scen_color()
get_suffix()
get_var_group()
gpd_to_ccrs()
load_image()
loc_mpl()
masknan_sizes_key()
norm2range()
plot_coords()
plot_logo()
process_keys()
set_mpl_style()
set_plot_attrs()
size_legend_elements()
sort_lines()
split_legend()
wrap_text()
Submodules#
figanos._logo module#
- class figanos._logo.Logos[source]#
Bases:
object
Class for managing logos to be used in graphics.
Methods#
- default
The path to the default logo. can be temporarily set to a different logo via Logos().default = pathlib.Path().
- installed()
Retrieves a list of installed logos.
- install_ouranos_logos(*, permitted: bool = False)
Fetches and installs the Ouranos logos.
- set_logo(path: Union[str, Path], name: str = None)
Sets the path and name to a logo file. If no logos are already set, the first one will be set as the default.
- reload_config()
Reloads the logo configuration from the YAML file.
Examples#
>>> from figanos import Logos >>> logos = Logos() >>> logos.default PosixPath('/home/user/.config/figanos/logos/figanos_logo.png') >>> logos.installed() ['default', 'figanos_logo'] >>> logos.set_logo("path/to/logo.png", name="my_logo") PosixPath('/home/user/.config/figanos/logos/my_logo.png') >>> logos["my_logo"] PosixPath('/home/user/.config/figanos/logos/my_logo.png') >>> logos.default = "path/to/temporary/default/logo.png" >>> logos PosixPath("path/to/temporary/default/logo.png") >>> logos.reload_config() >>> logos.default PosixPath('/home/user/.config/figanos/logos/figanos_logo.png')
- property catalogue: Path#
The path to the logo configuration file.
- property default: Path#
The path to the default logo.