# Removing legend title

**URL:** <https://discourse.holoviz.org/t/removing-legend-title/1317>\
**Category:** HoloViews\
**Tags:** holoviews\
**Created:** [October 15, 2020, 5:33pm UTC](https://discourse.holoviz.org/t/removing-legend-title/1317 "2020-10-15T17:33:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahuang11](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/ahuang11/32/4947_2.png) [@ahuang11](https://discourse.holoviz.org/u/ahuang11)\
**Post date:** [October 15, 2020, 5:33pm UTC](https://discourse.holoviz.org/t/removing-legend-title/1317/1 "2020-10-15T17:33:10Z")

</div>

```auto
import xarray as xr
import hvplot.xarray
ds = xr.tutorial.open_dataset('air_temperature').mean(['lat', 'lon'])
ds['airx2'] = ds['air'] * 2
ds = ds.to_array().rename('test')
ds.hvplot('time', by='variable')

```

Is there a way to remove legend title `variable`?

 ![image](https://discourse.holoviz.org/uploads/default/original/2X/f/f1b821877f80dec16a195e217dcae9fc95fad839.png)

---

<div class="post-metadata">

**Author:** ![marcbernot](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/marcbernot/32/924_2.png) [@marcbernot](https://discourse.holoviz.org/u/marcbernot)\
**Post date:** [October 16, 2020, 8:13am UTC](https://discourse.holoviz.org/t/removing-legend-title/1317/2 "2020-10-16T08:13:17Z")

</div>

In holoviews, this gives you what you want.

```python
h = ds.hvplot('time', by='variable')
h.get_dimension('variable').label=''

```

There is a `h.redim.label` function also but I don’t manage to make it work.

Besides, there is always the possibility to finely tune what you want on the bokeh side of things.

```python
    import holoviews as hv
    from bokeh.io import show
    h = ds.hvplot('time', by='variable')
    fig = hv.renderer('bokeh').get_plot(h).state
    fig.legend.to_json(include_defaults=False)

```

This last line indicates what can be changed about the legend:

```json
    {'click_policy': 'mute',
    'id': '2395',
    'items': [{'id': '2396'}, {'id': '2427'}],
    'location': [0, 0],
    'title': 'variable'} 

```

These next lines yield the desired result:

```python
fig.legend.title = ''
show(fig)

```
