Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct (/control) spacing in layout #6311

Closed
arafune opened this issue Jul 8, 2024 · 5 comments
Closed

Correct (/control) spacing in layout #6311

arafune opened this issue Jul 8, 2024 · 5 comments
Labels
needs info More information required from issue creator

Comments

@arafune
Copy link
Contributor

arafune commented Jul 8, 2024

Complete, minimal, self-contained example code that reproduces the issue

https://holoviews.org/gallery/demos/bokeh/mandelbrot_section.html

The output of the code shown in the above webpage is same as on my Mac. I would like to control the space between two rows of the figures.

For me, the space is too wide, I would like to change it. Actually my own problem is same. I would like to change the spacing between two plots using .col(1).

Here is my own code:

import holoviews as hv
import xarray as xr
from holoviews import opts, streams
hv.extension("bokeh")

def crosshair_view2(dataarray: xr.DataArray) -> None:
"""Show Crosshair view."""

# Create two images
posx = hv.streams.PointerX(x=0)
posy = hv.streams.PointerY(y=0)
vline = hv.DynamicMap(lambda x: hv.VLine(x or -100), streams=[posx])
hline = hv.DynamicMap(lambda y: hv.HLine(y or -100), streams=[posy])
img = hv.Image(dataarray, kdims=list(dataarray.dims))
profile_x = hv.DynamicMap(lambda x: img.sample(**{dataarray.dims[0]: x if x else 0}), streams=[posx])
profile_y = hv.DynamicMap(lambda y: hv.Curve(dataarray.sel({dataarray.dims[1]: y if y else 0}, method = "nearest")), streams=[posy])
return  (img * hline * vline + profile_y).cols(1)
@arafune
Copy link
Contributor Author

arafune commented Jul 8, 2024

On my Mac, the result show like this:

スクリーンショット 2024-07-08 13 41 44

@maximlt
Copy link
Member

maximlt commented Jul 8, 2024

I get this view when I run the code in https://holoviews.org/gallery/demos/bokeh/mandelbrot_section.html.

image

I was no able to run your code, it is incomplete. Please provide more details as your issue is unclear to me.

@maximlt maximlt added the needs info More information required from issue creator label Jul 8, 2024
@arafune
Copy link
Contributor Author

arafune commented Jul 8, 2024 via email

@arafune
Copy link
Contributor Author

arafune commented Jul 16, 2024

need more info?

@arafune
Copy link
Contributor Author

arafune commented Oct 15, 2024

After upgrading the several packages (I cannot figure out which package is essential), this problem does not appear.

@arafune arafune closed this as completed Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info More information required from issue creator
Projects
None yet
Development

No branches or pull requests

2 participants