Questions tagged [hvplot]

Hvplot is a high-level Python visualization library that makes interactive plotting beautiful, easy and intuitive for a wide range of datatypes. It is built on top of HoloViews and is an alternative for the static plotting API provided by pandas and other libraries, with an interactive Bokeh-based plotting API.

Official website: https://hvplot.pyviz.org

181 questions
1
vote
0 answers

Master detail plot with hvplot, Holoviews and Bokeh in Jupyter Lab?

I have a dataset (Pandas DataFrame) that I'm plotting in a Bokeh scatter plot by means of hvplot. For each and every datapoint in that master dataset (also DataFrame) there is an additional dataset available with more detailed data. I would like to…
Hendrik Wiese
  • 2,010
  • 3
  • 22
  • 49
1
vote
1 answer

Streaming for Xarray NetCDF Files

I was wondering if there was a way to stream data directly from a NetCDF file as it's being written with `xarray. I think I can "create" a non-buffered file like this? import io ts_file_stream = io.open("/some/file/being/written/to.nc", mode='rb',…
pgierz
  • 674
  • 3
  • 7
  • 14
1
vote
0 answers

Horizontal bars with start and end positions using hvplot or holoviews

Is there a simple way to plot horizontal bars that have different starting positions? The closest example I found in the reference galery is implemented as segments : http://holoviews.org/reference/elements/bokeh/Segments.html
Raja
  • 69
  • 1
  • 7
1
vote
1 answer

What's wrong with my vdims in my HoloViews Python code?

display(df_top5_frac.head()) The code below produces an error. %opts Overlay [width=800 height=600 legend_position='top_right'] Curve hv.Curve((df_top5_frac['Blocked Driveway']) , kdims = ['Hour'], vdims = ['Fraction'], label = 'Blocked…
Ramin Melikov
  • 967
  • 8
  • 14
1
vote
1 answer

hvplot histogram: DataError: None of the available storage backends were able to support the supplied data format

import pandas as pd import numpy as np import random import copy import feather import plotly.graph_objects as go import plotly.express as px import panel as pn import holoviews as hv import geoviews as gv import geoviews.feature as gf import…
mmTmmR
  • 573
  • 2
  • 8
  • 20
1
vote
1 answer

Adding values to grouped bar chart in hvplot

I'm trying to add labels to a grouped hvplot barchart. My example dataframe has the following structure: import pandas as pd import numpy as np import holoviews as hv import hvplot.pandas hv.extension('bokeh') df = pd.DataFrame({'A' :…
nsis
  • 63
  • 6
1
vote
0 answers

How to align Gridspace plots in holoviews Layout?

I have trouble understanding how the holoviews Layout works if it contains Gridspace components. In the example below I have 2 simple plots that are returned as Gridspace. While they display just fine, I'd like to align them on the right edge.…
sschafer
  • 49
  • 2
1
vote
0 answers

Access subplot elements of holoviews Gridspace

Is there a way to access individual subplots in a hv.Gridspace to overlay individual texts? I'm using hvplot and like the convenient API to split plots by rows/columns as in gs = df.hvplot(x='x', y='y', datashade=True, row='row', col='col'), using…
sschafer
  • 49
  • 2
1
vote
1 answer

Lineplot with markers in holoviews (or hvplot)

I know how to make a lineplot with holoviews / hvplot. But how can I add markers of the datapoints to my line plot? The plot should look something like this: Here's some sample code: # import libraries import numpy as np import pandas as pd import…
Sander van den Oord
  • 10,986
  • 5
  • 51
  • 96
1
vote
1 answer

Hvplot on GeoDataFrame of categorized linestrings fails to draw different colors

With hvplot 0.5.2 from conda-forge, I'm trying to plot a GeoPandas GeoDataFrame of lines using a column of categorical values called 'mode'. As you can see from the following screenshot, the column is picked up correctly and the three different…
underdark
  • 1,146
  • 7
  • 22
1
vote
0 answers

generate xarray.Dataset image subplots

Setup is a xarray.Dataset with two variables and a grid of values. import xarray as xr import numpy as np import hvplot.xarray ds = xr.Dataset({ 'temp': (('lon', 'lat'), 15 + 8 * np.random.randn(2, 2)), 'precip': (('lon', 'lat'), 10 *…
Ian
  • 1,062
  • 1
  • 9
  • 21
1
vote
2 answers

How to set up scaled axes with hvplot?

Question: How to set up scaled axes with hvplot? [https://hvplot.pyviz.org/] Code example: I have the following code giving me the figure hereafter but the lat and long axes are not equal. How to have a 1:1 ratio between the two axes? import…
swiss_knight
  • 5,787
  • 8
  • 50
  • 92
1
vote
1 answer

Y-axis is not updated on dropdown selection when I use datashader in hvplot

When I make a normal hvplot with a groupby it creates a DynamicMap where the y-axis changes when I select a different value in my dropdown. This is the behavior I want. However when I set datashade=True (with large data) the y-axis stays fixed,…
Sander van den Oord
  • 10,986
  • 5
  • 51
  • 96
1
vote
1 answer

How does one show the cdf from histogram data using holoviews?

I'm using holoviews with bokeh backend for interactive visualizations. I have a histogram with edges and frequency data. What is an elegant way of overlaying my histogram with the cumulative distribution (cdf) curve? I tried using the cumsum option…
1
vote
1 answer

How do i get a horizontal violin plot or boxplot? (default is vertical in hvplot holoviews)

Hvplot plots default a vertical violinplot or boxplot. See example below. How do I get this to be a horizontal plot? So basically I would like to rotate this plot. import numpy as np import pandas as pd import hvplot import hvplot.pandas df =…
Sander van den Oord
  • 10,986
  • 5
  • 51
  • 96