temporalmapper.plotting.centroid_datamap

temporalmapper.plotting.centroid_datamap(mapper, ax=None, edge_labels=None, vertices=None, edge_scaling=1, node_colouring='desaturate', bundle=False, node_kwargs={}, edge_kwargs={})

Plot the temporal graph in 2d with vertices at their cluster centroids.

Parameters:
  • mapper (temporal_mapper.TemporalMapper) – The temporal mapper object to plot.

  • ax (matplotlib.axes (optional, default=None)) – Matplotlib axis to draw on

  • node_colouring ('desaturate' or 'override' (optional, default=’desaturate’)) – Determines how to incorporate temporal information in the color. The desaturate option will take the semantic colouring from datamapplot and desaturate points that are further back in time. The override option will throw away the semantic colouring and colour points only based on their time value.

  • vertices (list (optional, default=None)) – List of nodes in mapper.graph to include in the plot.

  • edge_labels (dict (optional, default=None)) – Dictionary of labels with edge_labels[e] a string to label edge e.

  • edge_scaling (float (optional, default = 1)) – Scales the thickness of edges, larger is thicker.

  • bundle (bool (optional, default=True)) – If true, bundle the edges of the graph using datashader’s hammer_bundle function.

  • node_kwargs (dict (optional, default={})) – Keyword arguments passed to networkx.draw_networkx_nodes()

  • edge_kwargs (dict (optional, default={})) – Keyword arguments passed to networkx.draw_networkx_edges()

Returns:

The Axes object containing the centroid datamap.

Return type:

matplotlib.axes.Axes