yt.visualization.volume_rendering.camera.MosaicCamera.draw_grids

MosaicCamera.draw_grids(im, alpha=0.3, cmap='algae', min_level=None, max_level=None)

Draws Grids on an existing volume rendering.

By mapping grid level to a color, draws edges of grids on a volume rendering using the camera orientation.

Parameters:

im: Numpy ndarray :

Existing image that has the same resolution as the Camera, which will be painted by grid lines.

alpha : float, optional

The alpha value for the grids being drawn. Used to control how bright the grid lines are with respect to the image. Default : 0.3

cmap : string, optional

Colormap to be used mapping grid levels to colors.

min_level, max_level : int, optional

Optional parameters to specify the min and max level grid boxes to overplot on the image.

Returns:

None :

Examples

>>> im = cam.snapshot() 
>>> cam.add_grids(im)
>>> write_bitmap(im, 'render_with_grids.png')