yt.visualization.volume_rendering.camera.PerspectiveCamera.draw_box

PerspectiveCamera.draw_box(im, le, re, color=None)

Draws a box on an existing volume rendering.

Draws a box defined by a left and right edge by modifying an existing volume rendering

Parameters:

im: Numpy ndarray :

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

le: Numpy ndarray :

Left corner of the box

re : Numpy ndarray

Right corner of the box

color : array like, optional

Color of the box (r, g, b, a). Defaults to white.

Returns:

None :

Examples

>>> im = cam.snapshot() 
>>> cam.draw_box(im, np.array([0.1,0.2,0.3], np.array([0.5,0.6,0.7)))
>>> write_bitmap(im, 'render_with_box.png')