Using 'top_left' legend in a Layout plot cuts out a part of the plot
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 124
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
#### ALL software version info
(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc should be added within the dropdown below.)
Software Version Info
```plaintext
Bokeh: 3.7.3
hvPlot: 0.11.3.dev47+g816845f.d20250515
Pandas: 2.2.3
```
#### Description of expected behavior and the observed behavior
**Expected behaviour**
Creating a layout of multiple scatter plots in a 2 column grid should show the full plots.
**Observed behaviour**
Using `legend='top_left'` in any of the plots will cut parts of the plot out.
#### Complete, minimal, self-contained example code that reproduces the issue
```python
import hvplot.pandas # noqa
import hvsampledata
df = hvsampledata.penguins("pandas")
width = 300
plot1 = df.hvplot.scatter(x='flipper_length_mm', y='body_mass_g', by='species',
title="Default: legend=right", frame_width=width)
plot2 = df.hvplot.scatter(x='flipper_length_mm', y='body_mass_g', by='species',
legend='left', title="legend=left", frame_width=width)
plot3 = df.hvplot.scatter(x='flipper_length_mm', y='body_mass_g', by='species',
legend='top_right', title="legend=top_right", frame_width=width)
plot4 = df.hvplot.scatter(x='flipper_length_mm', y='body_mass_g', by='species',
legend='top_left', title="legend=top_left", frame_width=width) # The culprit
```
#### Screenshots or screencasts of the bug in action
**First layout**
```python
(plot1 + plot2 + plot3 + plot4).cols(2)
```

**Second layout**
```python
(plot4 + plot1 + plot2 + plot3).cols(2)
```

**Third layout**
```python
(plot3 + plot4 + plot1 + plot2).cols(2)
```

**Fourth layout**
```python
(plot2 + plot3 + plot4 + plot1).cols(2)
```

**Standalone plot (All copacetic)**

- [ ] I may be interested in making a pull request to address this
Contributor guide
Assessment
This issue has not been assessed yet.