Use hvplot to make Python pandas plots interactive with pan, zoom, and hover
Updated: Feb 18, 2021
Use hvplot to make Python pandas plots interactive with pan, zoom, and hover
For example, run the following:
pip install hvplot
import pandas as pd, numpy as np
idx = pd.date_range('1/1/2000', periods=1000)
df = pd.DataFrame(np.random.randn(1000, 4), index=idx, columns=list('ABCD')).cumsum()
import hvplot.pandas # noqa
df.hvplot()
Then use the mouse to drag. Select "Wheel Zoom" icon in the menu at the right of the plot to enable mouse wheel zooming.
Please like and share this post if you enjoyed it using the buttons at the bottom!
Stay up to date. Subscribe to my posts https://morrislee1234.wixsite.com/website/contact
Web site with my other posts by category https://morrislee1234.wixsite.com/website
Commenti