'Managing large number of data in holoviews/hvplot curve and scatter plots

Let's say I have a large DataFrame with lots of rows and I want to do a simple line plot of the data using hvplot/holoviews.

Example:

pd.DataFrame([i for i in range(1000000)]).hvplot()

On my machine this plot is slow to be rendered and very slow to navigate in with pan, zoom and so on. Is there an option to make the plot lighter to handle, kind of what datashade option does for multidimensional plotting?

At the moment, on my real data sampling is not an option, I want to keep all of my original data.



Solution 1:[1]

Datashader is not limited to multidimensional data, so just add datashade=True or rasterize=True (which is preferred in most cases, since it lets Bokeh provide colorbars and hover information).

screenshot

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 James A. Bednar