8.6. pyafv.visualize_2d_parallel

visualize_2d_parallel(pts, diag, r, ax=None, *, selected=None, **kw)[source]

Visualize a 2D snapshot from pyafv.ParallelFiniteVoronoiSimulator.build(). Note that “_parallel” here means that diag is generated by the parallel simulator, not that the visualization itself is parallelized with Python multiprocessing (though we have vectorized the drawing of individual domains).

The diagnostic dictionary must be built with plot_mode=True. Each domain is drawn using visualize_2d(), and the global axes bounds are adjusted once at the end.

Parameters:
  • pts (ndarray) – An (N, 2) array of point coordinates.

  • diag (dict[str, object]) – A diagnostic dict containing Voronoi diagram information.

  • r (float) – Maximum radius (or denoted as \(\ell\)) used for drawing arcs.

  • ax (Axes | None) – If provided, draw into the axes; otherwise create a new one.

  • selected (array-like | None, optional) – Global cells to draw. This can be either a one-dimensional array of integer indices or a boolean mask with length equal to len(pts). If None, draw all owned cells from every domain.

  • **kw – Additional keyword arguments passed to visualize_2d().

Returns:

The matplotlib figure object representing the entire canvas.

Return type:

Figure