Holoviews: legend and size not working for overlay on MANY items

Created on 18 Oct 2019  路  2Comments  路  Source: holoviz/holoviews

If you boost number of items to overlay in this example http://holoviews.org/gallery/demos/bokeh/scatter_economic.html#bokeh-gallery-scatter-economic - then it will stop working.

Not only Legend disappears but one also can't set size for scatter plot anymore.
Please advise how to fix this and why it's happening.

Issue is illustrated in this notebook: https://anaconda.org/thoth/scatter_economic/notebook

I can imagine a workaround for Legend by creating linked plot to control scatter - but can't think of how to do that...
I can't imagine why size would not work anymore.

Most helpful comment

The legend disappears because it reaches legend_limit; increase that option value if you still want a legend even when the number of legend entries gets ridiculous. No idea about the size issue.

All 2 comments

The legend disappears because it reaches legend_limit; increase that option value if you still want a legend even when the number of legend entries gets ridiculous. No idea about the size issue.

Thank you, @jbednar !
I would never find that parameter myself - should have looked for legend properties closer!
I think I can reproduce the size issue - check the notebook one more time - I refreshed it.
https://anaconda.org/thoth/scatter_economic/notebook

Basically when legend cannot be shown due to legend_limit being too low - size breaks the code.
This would not work:

m = macro_new
gdp_unem_scatter = m.to.scatter('Year', ['GDP Growth', 'Unemployment'])
overlay = gdp_unem_scatter.overlay('Country')
# but this would work: opts.NdOverlay(show_legend=True, legend_limit=100),
overlay.options(opts.NdOverlay(show_legend=True),
                opts.Scatter(width=1000,height=400,
                             legend_position='left',
                             size=dim('Unemployment')*1.5
                            )
               )
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ceh-creare picture ceh-creare  路  5Comments

ericmjl picture ericmjl  路  3Comments

ahuang11 picture ahuang11  路  3Comments

michaelaye picture michaelaye  路  3Comments

bstadlbauer picture bstadlbauer  路  3Comments