Dike plotting module

KoswatLayerPlot

Bases: KoswatPlotProtocol

plot(color: str) -> None

Plots a KoswatLayerProtocol into the provided canvas plot_axes with the requested color.

Parameters:

Name Type Description Default
color str

Color code.

required

return list( map(concatenate, zip(*map(lambda x: x.coords.xy, koswat_geometry.geoms))) ) ValueError: When the KoswatLayerProtocol material has not been registered.

KoswatLayerProtocol

Bases: Protocol

as_data_dict() -> dict

Returns the information related to an instance of the KoswatLayerProtocol.

Returns:

Name Type Description
dict dict

custom dictionary with the relevant data.

KoswatPlotProtocol

Bases: Protocol

plot(*args, **kwargs) -> pyplot.axes

Plots a koswat_object into the provided plot ax with the requested *args and **kwargs.

Returns:

Type Description
pyplot.axes

pyplot.axes: Canvas with plotted koswat_object.

KoswatLayerPlot

Bases: KoswatPlotProtocol

plot(color: str) -> None

Plots a KoswatLayerProtocol into the provided canvas plot_axes with the requested color.

Parameters:

Name Type Description Default
color str

Color code.

required

return list( map(concatenate, zip(*map(lambda x: x.coords.xy, koswat_geometry.geoms))) ) ValueError: When the KoswatLayerProtocol material has not been registered.

KoswatLayerProtocol

Bases: Protocol

as_data_dict() -> dict

Returns the information related to an instance of the KoswatLayerProtocol.

Returns:

Name Type Description
dict dict

custom dictionary with the relevant data.

KoswatLayersWrapperPlot

Bases: KoswatPlotProtocol

with_layers_list(layers_list: List[KoswatLayerProtocol]) -> KoswatLayersWrapperPlot classmethod

Class method to aid the usage of this class with unrelated layers from different wrappers.

Parameters:

Name Type Description Default
layers_list List[KoswatLayerProtocol]

List of layers to wrap just for plotting.

required

Returns:

Name Type Description
KoswatLayersWrapperPlot KoswatLayersWrapperPlot

Initialized valid instance with custom intenal wrapper PlotLayersWrapper.

KoswatLayersWrapperProtocol

Bases: Protocol

as_data_dict() -> dict

Returns the layers as a dictionary.

Returns:

Name Type Description
dict dict

Dictionary containing all the information of the wrapper layers (KoswatLayerProtocol).

KoswatPlotProtocol

Bases: Protocol

plot(*args, **kwargs) -> pyplot.axes

Plots a koswat_object into the provided plot ax with the requested *args and **kwargs.

Returns:

Type Description
pyplot.axes

pyplot.axes: Canvas with plotted koswat_object.

get_cmap(n_colors: int, name: int = 'hsv')

Returns a function that maps each index in 0, 1, ..., n-1 to a distinct RGB color; the keyword argument name must be a standard mpl colormap name.

KoswatLayersWrapperPlot

Bases: KoswatPlotProtocol

with_layers_list(layers_list: List[KoswatLayerProtocol]) -> KoswatLayersWrapperPlot classmethod

Class method to aid the usage of this class with unrelated layers from different wrappers.

Parameters:

Name Type Description Default
layers_list List[KoswatLayerProtocol]

List of layers to wrap just for plotting.

required

Returns:

Name Type Description
KoswatLayersWrapperPlot KoswatLayersWrapperPlot

Initialized valid instance with custom intenal wrapper PlotLayersWrapper.

KoswatPlotProtocol

Bases: Protocol

plot(*args, **kwargs) -> pyplot.axes

Plots a koswat_object into the provided plot ax with the requested *args and **kwargs.

Returns:

Type Description
pyplot.axes

pyplot.axes: Canvas with plotted koswat_object.

KoswatPlotProtocol

Bases: Protocol

plot(*args, **kwargs) -> pyplot.axes

Plots a koswat_object into the provided plot ax with the requested *args and **kwargs.

Returns:

Type Description
pyplot.axes

pyplot.axes: Canvas with plotted koswat_object.