Questions tagged [holoviews]

HoloViews is a Python library that makes analyzing and visualizing scientific or engineering data much simpler, more intuitive, and more easily reproducible.

HoloViews is a Python library that makes analyzing and visualizing scientific or engineering data much simpler, more intuitive, and more easily reproducible. Without HoloViews, there are typically many steps required before you can see your data, whether you use a GUI interactively or write a function or script to build up a plot. HoloViews instead lets you store your data in an annotated format that is instantly visualizable, with immediate access to both the numeric data and its visualization. For instance, if you wrap a two-dimensional dataset like a fractal in a HoloViews Image object named fractal , you can just type fractal to view it as an image in an IPython/Jupyter Notebook . Most importantly, combining it with other objects is now easy -- you can e.g. view it annotated with a horizontal line and a histogram, next to a slice of it from the indicated cross-section, all without writing any plotting code.

Features

Overview

  • Lets you build data structures that both contain and visualize your data.
  • Includes a rich library of composable elements that can be overlaid, nested, and positioned with ease.
  • Supports rapid data exploration that naturally develops into a fully reproducible workflow .
  • You can create complex animated or interactive visualizations with minimal code.
  • Rich semantics for indexing and slicing of data in arbitrarily high-dimensional spaces .
  • Every parameter of every object includes easy-to-access documentation.
  • All features available in vanilla Python 2 or 3 , with minimal dependencies.
  • All examples on the website are tested automatically each night, using the latest version of the code.

Support for maintainable, reproducible research

  • Supports a truly reproducible workflow by minimizing the code needed for analysis and visualization.
  • Already used in a variety of research projects, from conception to final publication.
  • All HoloViews objects can be pickled and unpickled, with no plotting-library dependencies.
  • Provides comparison utilities for testing, so you know when your results have changed and why.
  • Core data structures only depend on the numpy and param libraries.
  • Provides export and archival facilities for keeping track of your work throughout the lifetime of a project.

Analysis and data access features

  • Allows you to annotate your data with dimensions, units, labels and data ranges.
  • Easily slice and access regions of your data, no matter how high the dimensionality.
  • Apply any suitable function to collapse your data or reduce dimensionality.
  • Helpful textual representation to inform you how every level of your data may be accessed.
  • Includes small library of common operations for any scientific or engineering data.
  • Highly extensible: add new operations to easily apply the data transformations you need.

Visualization features

  • Useful default settings make it easy to inspect data, with minimal code.
  • Powerful normalization system to make understanding your data across plots easy.
  • Build complex animations or interactive visualizations in seconds instead of hours or days.
  • Refine the visualization of your data interactively and incrementally.
  • Separation of concerns: all visualization settings are kept separate from your data objects.
  • Support for interactive tooltips/panning/zooming/linked-brushing, via the optional bokeh or mpld3 backends.

Jupyter/IPython Notebook support

  • Support for both IPython 2 and 3 and for the Jupyter project.
  • Automatic tab-completion everywhere.
  • Exportable sliders and scrubber widgets.
  • Automatic display of animated formats in the notebook or for export, including gif, webm, and mp4.
  • Useful IPython magics for configuring global display options and for customizing objects.
  • Automatic archival and export of notebooks , including extracting figures as SVG, generating a static HTML copy of your results for reference, and storing your optional metadata like version control information.

Integration with third-party libraries

  • Flexible interface to both the pandas and Seaborn libraries
  • Immediately visualize pandas data as any HoloViews object.
  • Seamlessly combine and animate your Seaborn plots in HoloViews rich, compositional data-structures.

Official website: http://holoviews.org/

667 questions
6
votes
1 answer

Holoviews Hovertool show extra row?

I have a dataset where I want to plot make plots with 2 different variables on the X-axis (in 2 different plots), but I want to get the other value into the Hovertool from io import StringIO import pandas as pd data =…
Maarten Fabré
  • 6,938
  • 1
  • 17
  • 36
6
votes
1 answer

What is the best way to change the widget type in an hvplot/holoviews/panel object?

Using the functionality in pyviz, it's easy to generate an hvplot/panel interactive dashboard for a gridded xarray dataset, like this air temperature data example: import xarray as xr import hvplot.xarray import panel as pn airtemps =…
Rich Signell
  • 14,842
  • 4
  • 49
  • 77
6
votes
3 answers

How to make the Holoviews show graph on Google Colaboratory notebook?

I tried all three backends but didn't show any graph. An example is: !pip install -q holoviews import holoviews as hv from holoviews import opts hv.extension('matplotlib') # build a dataset where multiple columns measure the same thing stamp …
Yingbo Miao
  • 882
  • 9
  • 12
6
votes
2 answers

Panel/Hvplot interaction when variable is changing

I'm trying to create a dashboard with two holoviews objects: a panel pn.widgets.Select object that contains a list of xarray variables, and a hvplot object that takes the selected variable on input, like this: def hvmesh(var=None): mesh =…
Rich Signell
  • 14,842
  • 4
  • 49
  • 77
6
votes
1 answer

Secondary axis for Holoviews(Bokeh) graph

I am trying to plot a set of graphs overlaid with a plot showing the % difference between them. The code I have for plotting: %%output size = 200 %%opts Curve[height=200, width=400,show_grid=True,tools=['hover','box_select'], xrotation=90] %%opts…
Brain_overflowed
  • 426
  • 1
  • 5
  • 21
6
votes
2 answers

Plot multiple lines with holoviews

I have a df that looks like this: data = {'Cumulative': {0: 4, 1: 18, 2: 24, 3: 24, 4: 4, 5: 20, 6: 32, 7: 42}, 'Id': {0: 1, 1: 1, 2: 1, 3: 1, 4: 2, 5: 2, 6: 2, 7: 2}, 'Order': {0: '1-1', 1: '1-2', 2: '1-3', 3: '1-4', 4: '1-1', 5: '1-2',…
bowlby
  • 649
  • 1
  • 8
  • 18
6
votes
1 answer

customising tooltips in holoview

does anyone know how to change the hover tooltips when using holoviews with a bokeh backend? in my notebook and using holoviews for visualisation i activate tooltips using %%opts Scatter [tools=['hover']] by default this makes a tooltip which…
sdsodi
  • 73
  • 1
  • 4
5
votes
1 answer

Timeseries with multiple colors and legend using Datashader and Holoviews

I would like to plot a timeseries dataframe with 3 columns, one for each curve. I would like each curve to have its own color and also display a legend, as hvplot() does by default. Here is a self-contained example: import numpy as np import pandas…
gaborous
  • 15,832
  • 10
  • 83
  • 102
5
votes
1 answer

Saving a holoviews plot as an SVG

I would like to save a holoviews plot as a SVG, however I am getting an error message that I don't understand: np.random.seed(9) data = np.random.rand(10, 2) points = hv.Points(data) labels = hv.Labels({('x', 'y'): data, 'text':…
Steve OB
  • 63
  • 6
5
votes
1 answer

Python - Plot a specific subset of large datasets using Holoviews Bokeh

What I am trying to do is to create an interactive plot with Pan and Zoom in/out interactions for large time series. Consider the next case in Jupyter Notebook: import numpy as np import holoviews as hv import holoviews.plotting.bokeh from…
5
votes
2 answers

Change the order of bars in a grouped barplot with hvplot/holoviews

I try to create a grouped bar plot but can't figure out how to influence the order of the barplot. Given these example data: import pandas as pd import hvplot.pandas df = pd.DataFrame({ "lu": [200, 100, 10], "le": [220, 80, 130], …
MichaelA
  • 1,866
  • 2
  • 23
  • 38
5
votes
3 answers

Holoviews: Remove variables names from x axis on grouped bar chart

Quick question about a HoloViews grouped (unstacked) bar chart. How can I remove the x axis variable name ticks, but have them included in a legend? Please see example below: I would like to do the following: For the red box, remove the names for…
Amen_90
  • 310
  • 2
  • 9
5
votes
1 answer

Different color in hvplot.box

The following code generates the linked image. It generates mostly what I want but I would like the box color to be different between Real and Preds. How would I do that with Holoviews or Hvplot? import hvplot.pandas import pandas as pd import numpy…
5
votes
2 answers

How to get a widget "handler" in HoloViews

When creating a plot (QuadMesh) with HoloViews based on xArray data, any missing dimensions will automatically create widgets such as sliders to facilitate data exploration. For example: hv_ds = hv.Dataset(data) plot = hv_ds.to(hv.QuadMesh,…
5
votes
1 answer

Streaming from a pandas DataFrame Using Streamz

The streamz and hvplot packages work together to provide support for plotting streaming data using pandas dataframes. For example, the streamz package has a convenience utility for creating a random streaming dataframe: import hvplot.streamz from…
psychemedia
  • 5,690
  • 7
  • 52
  • 84
1
2
3
44 45