# ``igraph`.`drawing`.`matplotlib`.`dendrogram`.`MatplotlibDendrogramDrawer``

class documentation

`class MatplotlibDendrogramDrawer(AbstractDrawer): (source)`

Constructor: `MatplotlibDendrogramDrawer(ax)`

View In Hierarchy

Matplotlib drawer object for dendrograms.

Method | `__init__` | Constructs the drawer and associates it to the given Axes.
Method | `draw` | Draws the given Dendrogram in a matplotlib Axes.
Instance Variable | `context` | Undocumented
Method | `_plot_item` | Plots a dendrogram item to the given Cairo context

def __init__(self, ax): (source)

Constructs the drawer and associates it to the given Axes.

Parameters
ax | the Axes on which we will draw

def draw(self, dendro, orientation='lr', **kwds): (source)
overrides `igraph.drawing.baseclasses.AbstractDrawer.draw`

Draws the given Dendrogram in a matplotlib Axes.

Other keyword arguments are passed to mpl.patches.Polygon.

Parameters
dendro | the igraph.Dendrogram to plot.
orientation | the direction of the plot. Accepted values are "lr" (root on the right), "rl" (root on the left), "tb" (root at the bottom), and "bt" (root at the top). A few aliases are available (see `utils.str_to_orientation`).
**kwds | Undocumented

context = (source)

Undocumented

def _plot_item(self, dendro, ax, orientation, idx, x, y): (source)

Plots a dendrogram item to the given Cairo context

Parameters
dendro | the dendrogram object
ax | Undocumented
orientation | whether the dendrogram is horizontally oriented
idx | the index of the item
x | the X position of the item
y | the Y position of the item