# Raster ¶

Title
Raster Element
Dependencies
Matplotlib
Backends
Matplotlib
Bokeh
In [1]:
import numpy as np
import holoviews as hv
hv.extension('matplotlib')


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 [2]:
xvals = np.linspace(0,4,202)
ys,xs = np.meshgrid(xvals, -xvals[::-1])
hv.Raster(np.sin(((ys)**3)*xs))

Out[2]:

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).