yt.visualization.volume_rendering.camera.StereoPairCamera.draw_coordinate_vectors

StereoPairCamera.draw_coordinate_vectors(im, length=0.05, thickness=1)

Draws three coordinate vectors in the corner of a rendering.

Modifies an existing image to have three lines corresponding to the coordinate directions colored by {x,y,z} = {r,g,b}. Currently only functional for plane-parallel volume rendering.

Parameters:

im: Numpy ndarray :

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

length: float, optional :

The length of the lines, as a fraction of the image size. Default : 0.05

thickness : int, optional

Thickness in pixels of the line to be drawn.

Returns:

None :

Examples

>>> im = cam.snapshot()
>>> cam.draw_coordinate_vectors(im)
>>> im.write_png('render_with_grids.png')