question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to control spacing between legend labels

See original GitHub issue

My issue is that I’m plotting many time series in one plot, which means there are many legend labels (49, to be exact). It seems that multi-column legends are yet to be implemented in bokeh (see #4529 and bokeh/bokeh#3880). So a bokeh legend can only be a single column (or row, which I’m not interested in). This means my only option is to make the plot super long (i.e. a large height input to opts) or to reduce the fontsize of the legend and make it more compact. The fontsize of legend labels can be controlled using p.opts(fontsize={'legend': 5}, but this doesn’t change the actual spacing between legend labels (so the legend height stays the same). I’d like to be able to also change the spacing between legend labels so that I can fit all 49 labels on one reasonably-sized plot. Is this already possible or, if not, could it be implemented in holoviews? Alternatively, could appropriate legend label spacing be determined automatically from the fontsize?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jbednarcommented, Jun 9, 2021

Reopened and given a new status:

0reactions
tom-anderssoncommented, Jun 9, 2021

Thanks for confirming @jbednar, have moved this issue to bokeh/bokeh#11326.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to change the spacing between legend items in ...
Example: Increase horizontal spacing between legend keys ... Example: Move the legend key labels to the bottom and increase vertical spacing
Read more >
How Change the vertical spacing between legend entries in ...
In this article, we will see how can we can change vertical space between labels of a legend in our graph using matplotlib,...
Read more >
How to Change Spacing Between Legend Items in ggplot2
You can use the following methods to change the spacing between legend items in ggplot2: Method 1: Change Horizontal Spacing
Read more >
Change Spacing Between Horizontal Legend Items of ggplot2 ...
How to increase or decrease the space before and after legend items of a ggplot2 graphic in the R programming language.
Read more >
Modifying ggplot2 themes - GitHub Pages
x axis label on top axis (element_text; inherits from axis.title.x) axis.title.y ... the horizontal spacing between legends (unit); inherits.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found