A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://stackoverflow.com/questions/79645726/how-to-disable-automatic-groupby-widget-in-hvplot below:

python - How to disable automatic groupby widget in hvplot?

hvplot has a groupby parameter that lets you pick what variables to group the output by. This results in a widget you use to select the data subset you want to plot.

If groupby is not specified, hvplot often infers what variables you want to group by. For example:

ds=xr.Dataset({
    'A':(['x','y','z'], np.arange(3*4*5).reshape(3,4,5)),
    'B':(['x','y','z'],2*np.arange(3*4*5).reshape(3,4,5)),
  },
  coords={
      'x':range(3),
      'y':range(4),
      'z':range(5)
  }
)
ds.hvplot.scatter('A','B')

Even though groupby is not specified, hvplot assumes you want groupby=['x','y','z']. So, this creates a widget with sliders for x, y, and z. Since only one point exists for every combination, the resulting scatter plots only have a single point, which isn't very informative!

Is there a way to force hvplot to plot all values in a single plot? Put another way, is there a way to tell it to not infer a default value for the groupby parameter, and not create a widget? In the above example, this would mean producing a scatter plot of all A and B values in the dataset.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4