Skip to content

module TopoPyScale.topo_plot

Collectio of plotting functions for TopoPyScale S. Filhol, December 2021


function map_terrain

map_terrain(
    ds_param,
    var='elevation',
    hillshade=True,
    cmap=<matplotlib.colors.ListedColormap object at 0x7f669fe9c8e0>,
    **kwargs
)

Function to plot terrain parameters

Args: ds_param: var: hillshade:

Returns:


function map_variable

map_variable(
    ds_down,
    ds_param,
    time_step=None,
    time=None,
    var=None,
    ax=None,
    cmap=<matplotlib.colors.LinearSegmentedColormap object at 0x7f669feaad90>,
    hillshade=True,
    **kwargs
)

Function to plot unclustered downscaled points given that each point corresponds to a cluster label

Args:

  • ds_down (dataset): TopoPyScale downscaled point object with coordinates (time, point_name). Can be single variable or multiple
  • ds_param (dataset): TopoPyScale toposub dataset with coordinates (x,y)
  • time_step (int): (optional) time step to plot.
  • time (str): (optional) time slice to plot. time overule time_step
  • var (str): variable from ds_down to plot. e.g. 't' for temperature if ds_down has more than one variable
  • cmap (obj): pyplot colormap object
  • hillshade (bool): add terrain hillshade in background
  • **kwargs: kwargs to pass to imshow() in dict format.

TODO:

  • if temperature, divergent colorscale around 0degC

function map_clusters

map_clusters(ds_down, ds_param, df_centroids=None, **kwargs)

This file was automatically generated via lazydocs.