# Custom hover info for violin distribution statistics

**URL:** <https://community.plotly.com/t/custom-hover-info-for-violin-distribution-statistics/37422>\
**Category:** 📊 Plotly Python\
**Created:** [April 7, 2020, 10:36pm UTC](https://community.plotly.com/t/custom-hover-info-for-violin-distribution-statistics/37422 "2020-04-07T22:36:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![juls858](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@juls858](https://community.plotly.com/u/juls858)\
**Post date:** [April 7, 2020, 10:36pm UTC](https://community.plotly.com/t/custom-hover-info-for-violin-distribution-statistics/37422/1 "2020-04-07T22:36:01Z")

</div>

is it possible to specify custom hover info for the distribution statistics?

```auto
df = pd.read_csv(
    "https://raw.githubusercontent.com/plotly/datasets/master/violin_data.csv")

df['foo'] = 'foo'
fig = go.Figure()

days_yes = df['day'][df['smoker'] == 'Yes']
grouped_labels_yes = days_yes.map(
    {"Thur": "A", "Fri": "A", "Sat": "B", "Sun": "B"})
days_no = df['day'][df['smoker'] == 'No']
grouped_labels_no = days_no.map(
    {"Thur": "A", "Fri": "A", "Sat": "B", "Sun": "B"})

fig.add_trace(go.Violin(x=[grouped_labels_yes, days_yes],
                        y=df['total_bill'][df['smoker'] == 'Yes'],
                        legendgroup='Yes', scalegroup='Yes', name='Yes',
                        side='negative',
                        line_color='blue')
              )
fig.add_trace(go.Violin(x=[grouped_labels_no, days_no],
                        y=df['total_bill'][df['smoker'] == 'No'],
                        legendgroup='No', scalegroup='No', name='No',
                        side='positive',
                        line_color='orange',
                        hovertext=df['foo'],
                        hoverinfo="none")
              )
fig.update_traces(meanline_visible=True)
fig.update_layout(violingap=0, violinmode='overlay')
fig.update_xaxes(showticklabels=False)
fig.show()

```

I tried using hover text, but that only adds to hover info which only shows for the points.

---

<div class="post-metadata">

**Author:** ![B1jam1](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@B1jam1](https://community.plotly.com/u/B1jam1)\
**Post date:** [July 15, 2024, 3:04pm UTC](https://community.plotly.com/t/custom-hover-info-for-violin-distribution-statistics/37422/2 "2024-07-15T15:04:24Z")

</div>

You could try to remove `hoverinfo = 'none'` and / or replace `'none'` by the information you want.
