eolearn.visualization.eopatch

This module implements visualizations for EOPatch

class eolearn.visualization.eopatch.PlotBackend(value)[source]

Bases: enum.Enum

Types of backend for plotting

MATPLOTLIB = 'matplotlib'
HVPLOT = 'hvplot'
eolearn.visualization.eopatch.plot_eopatch(*args, backend=PlotBackend.MATPLOTLIB, **kwargs)[source]

The main EOPatch plotting function. It pr

Parameters
Returns

A plot object that depends on the backend used.

Return type

object

class eolearn.visualization.eopatch.PlotConfig(rgb_factor=3.5, timestamp_column='TIMESTAMP', geometry_column='geometry', subplot_width=8, subplot_height=8, interpolation='none', subplot_kwargs=<factory>, show_title=True, title_kwargs=<factory>, label_kwargs=<factory>, bbox_kwargs=<factory>)[source]

Bases: eolearn.visualization.eopatch_base.BasePlotConfig

Advanced plotting configurations

Parameters
  • subplot_width (Union[float, int]) – A width of each subplot in a grid

  • subplot_height (Union[float, int]) – A height of each subplot in a grid

  • subplot_kwargs (Dict[str, object]) – A dictionary of parameters that will be passed to matplotlib.pyplot.subplots function.

  • show_title (bool) – A flag to specify if plot title should be shown.

  • title_kwargs (Dict[str, object]) – A dictionary of parameters that will be passed to matplotlib.figure.Figure.suptitle.

  • label_kwargs (Dict[str, object]) – A dictionary of parameters that will be passed to matplotlib methods for setting axes labels.

  • bbox_kwargs (Dict[str, object]) – A dictionary of parameters that will be passed to GeoDataFrame.plot when plotting a bounding box.

  • rgb_factor (Optional[float]) –

  • timestamp_column (Optional[str]) –

  • geometry_column (str) –

  • interpolation (str) –

Return type

None

subplot_width: Union[float, int] = 8
subplot_height: Union[float, int] = 8
interpolation: str = 'none'
subplot_kwargs: Dict[str, object]
show_title: bool = True
title_kwargs: Dict[str, object]
label_kwargs: Dict[str, object]
bbox_kwargs: Dict[str, object]
class eolearn.visualization.eopatch.MatplotlibVisualization(eopatch, feature, *, axes=None, config=None, **kwargs)[source]

Bases: eolearn.visualization.eopatch_base.BaseEOPatchVisualization

EOPatch visualization using matplotlib framework.

Parameters
  • eopatch (eolearn.core.eodata.EOPatch) – An EOPatch with a feature to plot.

  • feature – A feature from the given EOPatch to plot.

  • axes (Optional[numpy.ndarray]) – A grid of axes on which to write plots. If not provided it will create a new grid.

  • config (Optional[eolearn.visualization.eopatch.PlotConfig]) – A configuration object with advanced plotting parameters.

  • kwargs – Parameters to be passed to the base class.

plot()[source]

Plots the given feature

Return type

numpy.ndarray