Title
Raster Element
Dependencies
Plotly
Backends
Bokeh
Matplotlib
Plotly

In [ ]:
import numpy as np
import holoviews as hv
hv.extension('plotly')

A Raster is the base class for image-like elements (namely Image, RGB and HSV), but may be used directly to visualize 2D arrays using a color map:


In [ ]:
xvals = np.linspace(0,4,202)
ys,xs = np.meshgrid(xvals, -xvals[::-1])
hv.Raster(np.sin(((ys)**3)*xs))

The coordinate system of a Raster is the raw indexes of the underlying array, with integer values always starting from (0,0) in the top left, with default extents corresponding to the shape of the array. For a similar element used to visualize arrays but defined in a continuous Cartesian coordinate system, use the Image element.

For full documentation and the available style and plot options, use hv.help(hv.Raster).