# Remove hover data in plotexpress

**URL:** <https://community.plotly.com/t/remove-hover-data-in-plotexpress/67946>\
**Category:** 📊 Plotly Python\
**Created:** [September 14, 2022, 9:05pm UTC](https://community.plotly.com/t/remove-hover-data-in-plotexpress/67946 "2022-09-14T21:05:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SirTales](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@SirTales](https://community.plotly.com/u/SirTales)\
**Post date:** [September 14, 2022, 9:05pm UTC](https://community.plotly.com/t/remove-hover-data-in-plotexpress/67946/1 "2022-09-14T21:05:48Z")

</div>

Dear all,  
I’m trying to remove some of the displayed data from hover but since the data is a list, I’m having trouble, and I would appreciate some help. (Note: “n\_ing\_ead” and the others are just numbers)  
Thanks, in advance!  
Here is my code:

```auto
import plotly.express as px
import plotly.graph_objects as go

fig = px.bar(x = ['Ensino EAD', 'Ensino presencial', 'Total'],
             y = [n_ing_ead, n_ing_pres, n_ing],
             hover_name=['Ingressante no ensino EAD', 'Ingressante no ensino presencial', 'Total'],
             color=['EAD','Presencial','Total'],
             labels={'x':'Ingressantes','y':'Número de ingressantes'}, height=500, width = 500)

fig.layout.update(showlegend=False)
fig.show()

```

and here is a figure of what I want to remove (the “color=EAD” and “Ingressantes=Total” should be gone from all three bars  
 ![Screenshot from 2022-09-14 18-06-16](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/1/8/185b29c88aaed55ed5919e392ac9c02048270ab8.png)

---

<div class="post-metadata">

**Author:** ![jhupiterz](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jhupiterz/32/19435_2.png) [@jhupiterz](https://community.plotly.com/u/jhupiterz)\
**Post date:** [September 15, 2022, 2:13am UTC](https://community.plotly.com/t/remove-hover-data-in-plotexpress/67946/2 "2022-09-15T02:13:55Z")

</div>

Hi @SirTales and welcome to the community!  
If you load you’re data into a dataframe with column names you might be able to easily remove the data you don’t want to appear using something like this: `hover_data={'column_name_1': False, 'column_name_2': False}`.

[Here’s the docs](https://plotly.com/python/hover-text-and-formatting/#customizing-hover-text-with-plotly-express) for more info on hover text and formatting.  
Hope that helps.

---

<div class="post-metadata">

**Author:** ![trinityimma](https://avatars.discourse-cdn.com/v4/letter/t/eb9ed0/32.png) [@trinityimma](https://community.plotly.com/u/trinityimma)\
**Post date:** [September 15, 2022, 9:04am UTC](https://community.plotly.com/t/remove-hover-data-in-plotexpress/67946/3 "2022-09-15T09:04:58Z")

</div>

Alternatively, you can provide a hover\_template

```auto
fig.update_traces(
    hovertemplate='<b>%{x}</b><br>Número de ingressantes=%{y}'
)

```

Read more on that here: [Hover text and formatting in Python](https://plotly.com/python/hover-text-and-formatting/#customizing-hover-label-appearance)

---

<div class="post-metadata">

**Author:** ![SirTales](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@SirTales](https://community.plotly.com/u/SirTales)\
**Post date:** [September 15, 2022, 1:31pm UTC](https://community.plotly.com/t/remove-hover-data-in-plotexpress/67946/4 "2022-09-15T13:31:08Z")

</div>

Thank you for your answers!

Both of them worked like a charm!

Best regards!
