# Composing Plots#

So far we have generated plots using hvPlot, but we haven’t discussed what exactly these plots are and how they differ from the output of other libraries offering the .plot API. Here we will see that the .hvplot() output is actually a rich, composable and compositional object that can be used in many different ways, not just as an immediate plot. Specifically, hvPlot generates HoloViews objects rendered using the Bokeh backend (by default) so that they support interactive hovering, panning, and zooming.

In this notebook, we’ll examine the output of hvPlot calls to take a look at individual HoloViews objects. Then we will see how these “elements” offer us powerful ways of combining and composing layered visualizations.

We’ll read in the data as before, and also reindex by time so that we can more easily do resampling.

import pathlib
import pandas as pd
import numpy as np

%%time

CPU times: user 3.29 s, sys: 1.06 s, total: 4.35 s

import hvplot.pandas  # noqa: adds hvplot method to pandas objects