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

Show extra columns when hovering in a scatter plot with hvplot

I'm trying to add a label or hover column to the points in a scatter plot, but to no avail. For use as example data: import pandas as pd import holoviews as hv import hvplot.pandas df = pd.read_csv('http://assets.holoviews.org/macro.csv',…
MichaelA
  • 1,866
  • 2
  • 23
  • 38
9
votes
1 answer

How to disable scientific notation in hvPlot plots?

I have just started using hvPlot today, as part of Panel. I am having a difficult time figuring out how to disable scientific notation in my plots. For example here is a simple bar plot. The axis and the tootltip are in scientific notation. How can…
SCool
  • 3,104
  • 4
  • 21
  • 49
9
votes
1 answer

Change legend position using holoviews / hvplot

Hvplot has default the position of the legend on the right outside of the plot. How can I change this default legend position? import numpy as np import pandas as pd import hvplot import hvplot.pandas import holoviews as hv data =…
Sander van den Oord
  • 10,986
  • 5
  • 51
  • 96
7
votes
2 answers

Create a grid of plots with holoviews/hvplot and set the max number of columns

I'd like to plot several data into a grid using holoviews/hvplot, based on one dimension, which contains several unique data points. Considering this example: import seaborn as sns import hvplot.pandas iris = sns.load_dataset('iris') plot =…
MichaelA
  • 1,866
  • 2
  • 23
  • 38
7
votes
1 answer

how to add a constant line to hvplot

How to add a horizontal line to a hvplot ? Holoviews has .HLine and .VLine but not sure how to access it via pandas.hvplot or hvplot here is a sample dataframe and plotting script. import pandas as pd import hvplot.pandas df =…
muon
  • 12,821
  • 11
  • 69
  • 88
7
votes
1 answer

How do i rotate x labels or y labels? (hvplot or holoviews)

I've created the following plot with hvplot and want to rotate the xlabels in this plot: import numpy as np import pandas as pd import hvplot.pandas import holoviews as hv my_plot = pd.DataFrame(np.random.normal(size=[50, 2])).hvplot()
Sander van den Oord
  • 10,986
  • 5
  • 51
  • 96
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
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
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
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
4
votes
1 answer

Difference between hvplot and holoplot

So for a while now I have been migrating from Matplotlib to holoviews for my plotting needs, and mostly enjoying what I have experienced. Then i notice hvplot, which seems to make the holviews workflow way easier, by tying it closer together with…
user2194172
  • 99
  • 1
  • 5
1
2 3
12 13