yt.visualization.plot_modifications.GridBoundaryCallback

class yt.visualization.plot_modifications.GridBoundaryCallback(alpha=0.7, min_pix=1, min_pix_ids=20, draw_ids=False, periodic=True, min_level=None, max_level=None, cmap='B-W LINEAR_r', edgecolors=None, linewidth=1.0)[source]
annotate_grids(alpha=0.7, min_pix=1, min_pix_ids=20, draw_ids=False,
periodic=True, min_level=None, max_level=None, cmap=’B-W LINEAR_r’, edgecolors=None, linewidth=1.0):

Draws grids on an existing PlotWindow object. Adds grid boundaries to a plot, optionally with alpha-blending. By default, colors different levels of grids with different colors going from white to black, but you can change to any arbitrary colormap with cmap keyword, to all black grid edges for all levels with cmap=None and edgecolors=None, or to an arbitrary single color for grid edges with edgecolors=’YourChosenColor’ defined in any of the standard ways (e.g., edgecolors=’white’, edgecolors=’r’, edgecolors=’#00FFFF’, or edgecolor=‘0.3’, where the last is a float in 0-1 scale indicating gray). Note that setting edgecolors overrides cmap if you have both set to non-None values. Cutoff for display is at min_pix wide. draw_ids puts the grid id in the corner of the grid. (Not so great in projections...). One can set min and maximum level of grids to display, and can change the linewidth of the displayed grids.

Methods