2.0.0b10
catchment modelling framework
Loading...
Searching...
No Matches
CellMap Class Reference

Inherits ScalarMappable.

Detailed Description

Draws a map of the cell geometries. Only functional, when shapely is installed.

A CellMap is created with cells to show and a function returning a value from a cell

Usage example:
>>>import cmf
>>>p=cmf.project()
>>>def saturated_depth(c):
...    return c.saturated_depth
>>>cm = CellMap(p, saturated_depth)

Public Member Functions

 __init__ (self, cells, value_function, cmap=default_colormap, hold=True, vmin=None, vmax=None, **kwargs)
 
 autoscale (self)
 
 autoscale_None (self)
 
 get_artists (self)
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
cells,
value_function,
cmap = default_colormap,
hold = True,
vmin = None,
vmax = None,
** kwargs )
Creates a new map from cells

:param cells:
:param value_function:
:param cmap:
:param hold:
:param vmin:
:param vmax:
:param kwargs:

Member Function Documentation

◆ autoscale()

autoscale ( self)
Overwrite base class of maplotlib.cm.ScalarMappable to prevent missuse

◆ autoscale_None()

autoscale_None ( self)
Overwrite base class of maplotlib.cm.ScalarMappable to prevent missuse

◆ get_artists()

get_artists ( self)
Returns the list of matplotlib.patches.Polygons in the cell map.

Useful for Animations

:return: iterable of polygons