# Incorrect Hover Text

**URL:** <https://community.plotly.com/t/incorrect-hover-text/24758>\
**Category:** plotly.js\
**Created:** [June 18, 2019, 9:34pm UTC](https://community.plotly.com/t/incorrect-hover-text/24758 "2019-06-18T21:34:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laidinggg](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@laidinggg](https://community.plotly.com/u/laidinggg)\
**Post date:** [June 18, 2019, 9:34pm UTC](https://community.plotly.com/t/incorrect-hover-text/24758/1 "2019-06-18T21:34:14Z")

</div>

I’m creating a plot and would like the hovertext to indicate the instance number. Below is my code:

```
import plotly.plotly as py
import plotly.figure_factory as ff

fig = ff.create_facet_grid(
    df,
    x='lgbm_prob',
    y='lr_prob',
    facet_row='lgbm_quad',
    facet_col='lr_quad',
    text = df.instance,
    color_name='lgbm_quad'
)
iplot(fig)

```

In the plot, the instance number shown in the hover text is 992 but the x-axis and y-axis number doesn’t corresponds to the dataset. The instance number that corresponds to those values should be 9375. i used a single dataframe for the plot and text, why is there a discrepancy?

 ![Grid](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/9/9d3d257bb241968d3a98f27545ad3bb5aa7f8edd.png)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/8/869c3fb2abf26ef2eed00b73f79bfab29e037b8a.png)

---

<div class="post-metadata">

**Author:** ![michaelbabyn](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/michaelbabyn/32/3569_2.png) [@michaelbabyn](https://community.plotly.com/u/michaelbabyn)\
**Post date:** [June 19, 2019, 5:15pm UTC](https://community.plotly.com/t/incorrect-hover-text/24758/2 "2019-06-19T17:15:01Z")

</div>

I would recommend using plotly\_express instead of the figurefactory ([https://medium.com/@plotlygraphs/introducing-plotly-express-808df010143d](https://medium.com/@plotlygraphs/introducing-plotly-express-808df010143d)).

```python
import plotly_express as px

df.scatter(
    df,
    x='lgbm_prob',
    y='lr_prob',
    facet_row='lgbm_quad',
    facet_col='lr_quad',
    hover_data = ['lgbm_prob','lr_prob', 'lgbm_quad', 'lr_quad', 'instance']
    color='lgbm_quad'
)

```

---

<div class="post-metadata">

**Author:** ![laidinggg](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@laidinggg](https://community.plotly.com/u/laidinggg)\
**Post date:** [July 16, 2019, 7:30pm UTC](https://community.plotly.com/t/incorrect-hover-text/24758/3 "2019-07-16T19:30:50Z")

</div>

Thanks! this instance is showing up correctly now
