Hover tooltip data in seaborn and pandas

8k views Asked by At

Is it possible to create some kind of hover tooltip from pandas dataframe on a linear regression plot from seaborn library?

More specifically I have this code:

import pandas as pd
import numpy as np
from pandas import Series, DataFrame
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
dframe=pd.read_csv('pokemon.csv')
sns.lmplot('hp', 'total', dframe)

And the result is the linear regression chart. How can I create such a tooltip, that when i hover over one of the dots on the chart, the corresponding value from one of the columns in that dframe will be displayed? In this case the name of the Pokemon.

The csv file comes from Kaggle.

0

There are 0 answers