`hv.Layout` with `sizing_mode=scale_both` on its elements results in empty plot
See original GitHub issueLet’s say you want to create a responsive hv.Layout
with tabs. If the elements of a hv.Layout
have sizing_mode=scale_both
(or any sizing_mode
other than fixed
for that matter), the resulting plot will be empty.
I suspect this is related to @philippjfr’s comment (https://github.com/ioam/holoviews/issues/1230#issuecomment-289912599):
The thing is that a Layout does not determine it’s own size, instead all the elements making up a Layout do.
Below is a minimal example that reproduces the problem:
import numpy as np
import holoviews as hv
scatter_plots = [
hv.Scatter(
(np.random.randn(10), np.random.randn(10)),
label=str(i)).opts(
plot={
'width': 300,
'height': 300,
'sizing_mode': 'scale_both' # [1]
})
for i in range(5)]
hv.Layout(scatter_plots).opts(
plot={
'tabs': True,
'sizing_mode': 'scale_both'
})
# Displays an empty plot unless [1] is set to 'fixed'.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
`hv.Layout` with `sizing_mode=scale_both` on its elements ...
Layout have sizing_mode=scale_both (or any sizing_mode other than fixed for that matter), the resulting plot will be empty. I suspect this is ...
Read more >Working with Plot and Renderers — HoloViews v1.15.3
For this purpose we will create a relatively complex object, a Layout of HoloMap s containing Overlay s containing Elements . We'll instantiate...
Read more >Holoviews scatterplot is giving empty plot - Stack Overflow
I am trying to create a scatter plot with a DataFrame. But holoviews scatter function is giving me empty plot without any data...
Read more >How to add a histogram to just the x-axis? - HoloViews
Hi! I'm wondering how I add a histogram to just the x-axis. Surprisingly (to me) this adds a histogram to the y-axis: import...
Read more >Lesson 27: High level plotting with HoloViews
What kind of plotting element are you making (e.g., scatter, box-and-whisker, heat map, etc.). What columns specify the dimensions of the data, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In 1.12 we will be completely overhauling the layouts, at that point you can set
responsive=True
which will default to scale both behavior.You should be able to specify the
aspect
or thedata_aspect
, depending on whether you want to specify the shape on the screen or the ratio of data values.