holoviz / holoviz/hvplot

c, xoffset and yoffset for labels not working

Open
#901 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
124
Avg merge
1d 18h
Merged PRs (30d)
1

Description

I'm currently improving the docstrings of `labels`. I can see in `convert.py` that `c`, `xoffset`, `yoffset` should be available as `kind` parameters.

![image](https://user-images.githubusercontent.com/42288570/188329541-902660d1-e289-4ca7-9792-912cbc6877e2.png)

But I cannot see them have any effect.

```python
import hvplot.pandas # noqa
import pandas as pd

df = pd.DataFrame(
{'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'],
'Country': ['Argentina', 'Brazil', 'Chile', 'Colombia', 'Venezuela'],
'Latitude': [-34.58, -15.78, -33.45, 4.60, 10.48],
'Longitude': [-58.66, -47.91, -70.66, -74.08, -66.86],
'Color': ['blue', 'green', 'white', 'black', 'yellow']})

df.hvplot.points(x='Longitude', y='Latitude') * \
df.hvplot.labels(x='Longitude', y='Latitude', text='City', xoffset=100, yoffset=100, c='Color')
```

![image](https://user-images.githubusercontent.com/42288570/188329470-191e95e3-89b3-46c0-8d2d-712f9d073a65.png)

I would expect the labels not to be drawn on top of the points and to see different colors for the labels.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.