HoloViews

1.22.1 · active · verified Sat Apr 11

HoloViews is a high-level, declarative plotting API for the PyData ecosystem, providing a concise way to build complex, interactive visualizations. It works seamlessly with data structures from libraries like NumPy, Pandas, Xarray, Dask, and Narwhals, and can render plots using Bokeh, Matplotlib, or Plotly backends. The library maintains an active development pace with frequent patch and minor releases, typically every few weeks or months, ensuring broad compatibility and continuous feature enhancements.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize HoloViews with a backend (Bokeh in this case) and create a simple `Curve` plot from NumPy data. The `hv.extension()` call is crucial for setting up the plotting backend in environments like Jupyter notebooks.

import holoviews as hv
import numpy as np

hv.extension('bokeh')

# Create some sample data
xs = np.linspace(0, 2 * np.pi, 100)
ys = np.sin(xs)

# Create a Curve Element
curve = hv.Curve((xs, ys), 'x', 'y', label='Sine Wave')

# Display the plot (in a Jupyter environment)
curve

view raw JSON →