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
5
votes
1 answer

Setting default options for hvplots

I would like to set default options for the plots generated by hvplots. Normally in holoviews I would do this to set defaults for every plot: import holoviews as hv from holoviews import opts hv.extension('bokeh') opts.defaults(opts.Curve(…
Redlegjed
  • 187
  • 2
  • 11
5
votes
2 answers

Holoviews scatter plot color by categorical data

I've been trying to understand how to accomplish this very simple task of plotting two datasets, each with a different color, but nothing i found online seems to do it. Here is some sample code: import pandas as pd import numpy as np import…
Cris
  • 347
  • 1
  • 5
  • 11
5
votes
1 answer

How do I get HoloViews to display in Google Colabs notebooks?

I can't get any HoloViews graphics to display in any Google Colabs notebook. For example even the simple Bokeh example right out fo the HoloViews introduction points = hv.Points(np.random.randn(500,2)) points.hist(num_bins=51,…
orome
  • 45,163
  • 57
  • 202
  • 418
5
votes
1 answer

HoloViews DynamicMap hover tool does not update with chosen variable

I'm learning HoloViews with the Bokeh backend and am making an iPython/Jupyter display of the chosen column of a pandas DataFrame (actually it's an xarray Dataset but it's simpler to show the issue with a DataFrame). The issue is that when I chose…
Dan
  • 1,105
  • 12
  • 15
5
votes
0 answers

Why does tap tool not work with HoloViews DynamicMap?

With HoloViews/Bokeh Renderer (Holoviews = 1.11.2 / Bokeh 1.0.4 via current anaconda on Windows), I want to create a layout which consist of a scatter plot and RGB image. The scatter plot shows values of light-dark contrast in a movie. The RGB image…
Cutú Chiqueño
  • 855
  • 1
  • 10
  • 24
5
votes
2 answers

Regression line for holoviews scatter plot?

I'm creating a scatter plot from an xarray Dataset using scat = ds.hvplot.scatter(x='a', y='b', groupby='c', height=900, width=900) How can I add a regression line to this plot? I'm also using this to set some of the properties in the plot and I…
Rob
  • 1,336
  • 1
  • 15
  • 24
5
votes
1 answer

Changing colormap for categorical data in Holoviews/Datashader

I'm trying to visualize categorical spatial data using Datashader and Holoviews, similarly to https://anaconda.org/jbednar/census-hv-dask/notebook. However, when I try to assign different colors to categories, I always end up with same (presumably…
Runkles
  • 113
  • 8
5
votes
2 answers

Using Holoviews, how can I set a title?

I have been trying to set a title when using Holoviews and Bokeh. I'm overlaying 3 plots on each other. The code looks like this: %%opts Curve [width=900 height=400 show_grid=True tools=['hover'] finalize_hooks=[apply_formatter]] %%opts Curve…
Bob Swain
  • 3,052
  • 3
  • 17
  • 28
5
votes
1 answer

Plot 1 billion of points in 3D on the browser

I have grid of approximately 200 x 200 x 200 x 150 that I need to plot on the browser. This can be represented as X x Y x Z x Color. A 3D scatter has usually functionality for that. I have tried the plotly.Scatter3d that works wonders for much…
RicLeal
  • 923
  • 9
  • 23
5
votes
4 answers

Remove Bokeh Logo in HoloViews

Is it possible to remove the Bokeh logo from plots generated with HoloViews? Nothing against it... it's just that it may not make sense to display it in certain reports. :) I know that in Bokeh I can simply do: p = bkp.figure(...) ... p.toolbar.logo…
Bruno
  • 1,329
  • 2
  • 15
  • 35
5
votes
1 answer

How to link the axis in multiple holoviews plots?

I have created to datashader plots with holoviews: datashade(hv.Points(df[ [ 'PS Engine-% Load', 'PS Engine-Fuel Rate', ] ])) + datashade(hv.Points(df[ [ 'SB Engine-% Load', 'SB Engine-Fuel Rate', …
Martijn de Munnik
  • 924
  • 12
  • 23
5
votes
2 answers

How to rotate an element in Holoviews

Is there a way to rotate a plot 90° within Holoviews? I'm interested in knowing how to do that generally, but my immediate purpose is to generate a histogram that is rotated to put the frequency on the horizontal and key value on the vertical to…
Omegaman
  • 2,189
  • 2
  • 18
  • 30
5
votes
2 answers

How to set `vmin` and `vmax` for Holoviews Images?

I'm using GeoViews to plot maps of gridded data, as gv.Image object. Currently, my plotting function looks like this: def plot_variable(path): var_ = xr.open_dataarray(path) dataset = gv.Dataset(var_[:, 0].to_dataset(), …
andreas-h
  • 10,679
  • 18
  • 60
  • 78
4
votes
0 answers

jupyter lab kernel dies when trying to run hvplot

when trying to run the following code, the jupyter lab kernel dies with no error output, something to do with hvplot but after several hour of searching, I am unable to find anything regarding this matter: import geoviews as gv import…
4
votes
1 answer

hvplot call inside function does not display in Jupyter Notebook

I am new to hvplot and trying to include a call to .hvplot() inside a function definition, but it's not working. The following code works and displays a figure as expected: import pandas as pd import hvplot.pandas df = pd.DataFrame([1, 5, 3, 4,…
Dan
  • 1,105
  • 12
  • 15
1 2
3
44 45