landlab.plot.graph

plot_graph(graph, at='node,link,patch', with_id=True, axes=None)[source]

Plot elements of a graph.

Parameters:
  • graph (graph-like) – A landlab graph-like object.

  • at (str or iterable of str) – Comma-separated list of elements to plot.

  • with_id (str, iterable of str or bool) – Indicate which elements should be plotted with their corresponding id. Either a comma-separated list of grid elements or True to include ids for all elements of False for no elements.

  • axes (, optional) – Add the plot to an existing matplotlib Axes, otherwise, create a new one.

Returns:

The Axes containing the plot.

Return type:

Axes

plot_nodes(graph, color='r', with_id=True, markersize=4)[source]
plot_patches(graph, color='g', with_id=False)[source]