Raster#
Download this notebook from GitHub (right-click to download).
- Title
- Raster Element
- Dependencies
- Plotly
- Backends
- Bokeh
- Matplotlib
- Plotly
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:
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).
This web page was generated from a Jupyter notebook and not all interactivity will work on this website. Right click to download and run locally for full Python-backed interactivity.
Download this notebook from GitHub (right-click to download).