holoviews

How to do linked data selections in HoloViews with Datashader + Bokeh backend

丶灬走出姿态 提交于 2020-03-02 08:45:53
问题 Let me just start by complementing the HoloViews developers, this thing is pretty amazing. There are just a lot of pieces and it is a bit hard to figure out how to put them all together to do what I want:). I am trying here to do linked multidimensional data plotting, i.e. I want to have several plots showing views of the same data along various dimensions. I want then to harness the Bokeh selection tools to select data in one of the plots, and see where it is in the others. But I also need

An elegant way to add long names and units to plots with Holoviews

时间秒杀一切 提交于 2020-02-23 04:17:25
问题 I've started to use Holoviews with Python3 and Jupyter notebooks, and I'm looking for a good way to put long names and units on my plot axis. An example looks like this: import holoviews as hv import pandas as pd from IPython.display import display hv.notebook_extension() dataframe = pd.DataFrame({"time": [0, 1, 2, 3], "photons": [10, 30, 20, 15], "norm_photons": [0.33, 1, 0.67, 0.5], "rate": [1, 3, 2, 1.5]}, index=[0, 1, 2, 3]) hvdata = hv.Table(dataframe, kdims=["time"]) display(hvdata.to

Holoviews tap stream of correlation heatmap and regression plot

蹲街弑〆低调 提交于 2020-01-30 08:52:04
问题 I want to make a correlation heatmap for a DataFrame and a regression plot for each pair of the variables. I have tried to read all the docs and am still having a very hard time to connect two plots so that when I tap the heatmap, the corresponding regression plot can show up. Here's some example code: import holoviews as hv from holoviews import opts import seaborn as sns import numpy as np import pandas as pd hv.extension('bokeh') df = sns.load_dataset('tips') df = df[['total_bill', 'tip',

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

眉间皱痕 提交于 2020-01-30 05:01:13
问题 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 = xr.tutorial.load_dataset('air_temperature') atemp = airtemps.air[:10,:,:] mesh = atemp.hvplot(groupby='time') row = pn.Row(mesh) display(row) which automatically creates a slider for the time dimension: If I take a look at the object created: print(row) I can

Adding value labels to hvplot.bar

梦想的初衷 提交于 2020-01-25 00:19:10
问题 Using the hvplot tutorial we are trying to generate a bar plot with values as labels on the bars itself. The bar plot is generated using the following code import dask.dataframe as dd import hvplot.pandas df = dd.read_parquet('data/earthquakes.parq').persist() df.magType.value_counts().compute().to_frame().hvplot.bar() How can we add the value of the bars on the bar itself? 回答1: Use holoviews hv.Labels() to add value labels to your data. You create the labels separately and use the * symbol

How to host a Datashader-Bokeh Interactive Map as a web application?

﹥>﹥吖頭↗ 提交于 2020-01-24 22:18:00
问题 I have recently created an interactive Datashader-Bokeh Interactive Map that looks like this NYC Taxi Example on a Jupyter Notebook. The dynamic aggregation works beautifully when I run the code locally on my mac. My question is, is the current technology possible to host this as a web application - e.g. a web app without that Jupyter Notebook interface. And if so, how? I've come across some articles (this and this) that suggest HoloViews might be an appropriate "glue" to stitch up Datashader

How to host a Datashader-Bokeh Interactive Map as a web application?

烈酒焚心 提交于 2020-01-24 22:16:27
问题 I have recently created an interactive Datashader-Bokeh Interactive Map that looks like this NYC Taxi Example on a Jupyter Notebook. The dynamic aggregation works beautifully when I run the code locally on my mac. My question is, is the current technology possible to host this as a web application - e.g. a web app without that Jupyter Notebook interface. And if so, how? I've come across some articles (this and this) that suggest HoloViews might be an appropriate "glue" to stitch up Datashader

How do I get a full-height vertical line with a legend label in holoviews + bokeh?

戏子无情 提交于 2020-01-24 14:45:29
问题 I want to plot a vertical line in holoviews with the bokeh backend which has a label that shows up in my legend. I need this line to be the full height of the plot, regardless of whether it is alone or overlaid with other elements. How can I achieve this? Example I'm adding in a curve plot in the example because otherwise even elements that can appear in a legend just use their label as a title. import numpy as np import holoviews as hv hv.extension("bokeh") x = np.linspace(0, 1) curve = hv

Install the latest git versions of holoviews, hvplot, panel, datashader and param

纵饮孤独 提交于 2020-01-22 02:23:09
问题 The libraries of the Holoviz ecosystem are continuously updated. Using pip, how do I install the latest git versions of: Holoviews Hvplot Panel Datashader Param 回答1: The latest github versions of the holoviz libraries can be installed as follows. Holoviews: pip install git+https://github.com/holoviz/holoviews.git Hvplot: pip install git+https://github.com/holoviz/hvplot.git Panel: pip install git+https://github.com/holoviz/panel.git Datashader: pip install git+https://github.com/holoviz

How do I manually set the tick locations of a colorbar for a Points plot in HoloViews?

ⅰ亾dé卋堺 提交于 2020-01-15 09:58:27
问题 I have the following code: import numpy as np import holoviews as hv from bokeh.models import FixedTicker hv.extension('bokeh') points = hv.Points(np.random.randint(-3, 4, (20, 3)), vdims=['interval']) points.opts( color='interval', size=10, colorbar=True, color_levels=7, colorbar_opts={ 'major_label_overrides': { -3: 'high', -2: 'medium', -1: 'low', 0: 'none', 1: 'low', 2: 'medium', 3: 'high' }, 'major_label_text_align': 'left', }, cmap='RdYlGn', ) Which produces something like: However, I