Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 12 21:52
    jbednar closed #132
  • Dec 12 21:52
    jbednar commented #132
  • Dec 12 21:26
    philippjfr labeled #405
  • Dec 12 21:26
    philippjfr unlabeled #405
  • Dec 12 21:26
    philippjfr labeled #406
  • Dec 12 21:26
    philippjfr unlabeled #406
  • Dec 12 21:26
    philippjfr commented #4126
  • Dec 12 21:26

    philippjfr on master

    fix XArrayInterface.aggregate h… (compare)

  • Dec 12 21:26
    philippjfr closed #4126
  • Dec 12 21:25
    philippjfr labeled #4126
  • Dec 12 19:52
    jbednar reopened #846
  • Dec 12 19:52
    jbednar closed #846
  • Dec 12 19:52
    jbednar commented #846
  • Dec 12 19:47
    jbednar commented #846
  • Dec 12 19:44
    jbednar commented #846
  • Dec 12 19:40
    nluetts opened #4126
  • Dec 12 18:24
    brendancol edited #847
  • Dec 12 18:23
    brendancol edited #847
  • Dec 12 17:47
    jbednar commented #846
  • Dec 12 17:47
    jbednar commented #846
hmm
why would the cron fail?
Philipp Rudiger
@philippjfr
Cron build with reduced dependencies, should be fixed of course but doesn't hold anything up.
Jean-Luc Stevens
@jlstevens
ok
Philipp Rudiger
@philippjfr
The cron build is missing pandas and panel so not surprising it fails, although technically pandas is still not a hard dependency.
Jean-Luc Stevens
@jlstevens
happy to make it one at this point
Martin Rindarøy
@rindis

@jbednar

@rindis , I'd recommend not ever switching the order like that; it currently works because of a quirk in how Bokeh handles "annotations" like map tiles, but it should not be ok to switch the order of an overlay in HoloViews. So if it doesn't work when you overlay map_tiles * plot, that's a problem that should be reported and addressed.

Didn't know that, thanks! I'll report it next time i see it :)

Martin Rindarøy
@rindis
When running an application with panel serve is it possible to change the tab name?
image.png
James A. Bednar
@jbednar
Yes; use obj.servable("Tab name") in the application's code.
Martin Rindarøy
@rindis
Perfect, thanks :)
Martin Rindarøy
@rindis
Is it possible to have two 'unlinked' map tile plots? Im trying the following, but the plots are linked, if I zoom in on one of them, the other one also zooms in.
import holoviews as hv
import panel as pn
import geoviews.tile_sources as gts
hv.extension('bokeh')

pn.Tabs(
    ('tab 1', gts.tile_sources['EsriOceanBase']),
    ('tab 2', gts.tile_sources['EsriOceanBase'])
)
Martin Rindarøy
@rindis

I'm struggelig to make GripSpec do what I want, and it is challenging to explain! However, below is the code that has gotten me closest to what I'm trying to acheive. The blue and green spacers represent the positions where I want to put plots, the red ones are spacers added to get the behaviour I want. So, firstly I want the blue spacer to always have an aspect ratio of 1, and the green spacer should have a max height of 300. With those restrictions the browser window will be split horizontally in half. In the lower half, the green spacer will span the whole width and fill the height up to 300. For the upper half, the blue spacer should be positioned in the center, fill the whole height, and fill the width to acheive aspect ratio of 1. With the below code this works partially, where I have also posted some gifs showing the behavior. When reducing the width of the browser, at some point the blue spacer starts to reduce more in size than necessary, because the red spacers seems to take precedence below that size. When changing the browser window height, the green spacer never changes.

Any input is greatly appreciated.

import panel as pn
import geoviews.tile_sources as gts
pn.extension()

grid_layout = pn.GridSpec(sizing_mode='stretch_both')
grid_layout[0,0] = pn.Spacer(background='#FF0000')
grid_layout[0,1] = pn.Spacer(background='blue', aspect_ratio=1)
grid_layout[0,2] = pn.Spacer(background='#FF0000', sizing_mode='stretch_height')
grid_layout[1,:] = pn.Spacer(background='green', max_height=300)

grid_layout.servable()
not-ok-vertical.gif
not-ok-horizontal.gif
ok-vertical.gif
Philipp Rudiger
@philippjfr
Is it possible to have two 'unlinked' map tile plots? Im trying the following, but the plots are linked, if I zoom in on one of them, the other one also zooms in.
pn.Tabs(
    ('tab 1', pn.panel(gts.tile_sources['EsriOceanBase'], linked_axes=False)),
    ('tab 2', pn.panel(gts.tile_sources['EsriOceanBase'], linked_axes=False))
)
Martin Rindarøy
@rindis
@philippjfr Brilliant, thanks :)
James A. Bednar
@jbednar
@rindis, is min_width or min_height set on the red spacers somehow (perhaps by default)? Try setting min_width and/or min_height to zero?
Philipp Rudiger
@philippjfr
Btw we are now discouraging use of the Gitter for user questions and are migrating to our discourse so the questions and answers don't get lost in the void. So you could be the first to post a question here: https://discourse.holoviz.org/
Oh, so it seems you'd not be the first anymore :)
James A. Bednar
@jbednar
I was about to say that. :-)
Marc Skov Madsen
@MarcSkovMadsen
Hello Discourse World :-)
Martin Rindarøy
@rindis
@jbednar I haven't set min_width or min_height myself, but it might be default as you say - that I dont know. I will try that when I get the chance
Martin Rindarøy
@rindis
@jbednar Setting min_height and min_width doesn't seem to change anything:
import panel as pn
import geoviews.tile_sources as gts
pn.extension()

grid_layout = pn.GridSpec(sizing_mode='stretch_both')
grid_layout[0,0] = pn.Spacer(min_height=0, min_width=0, background='#FF0000')
grid_layout[0,1] = pn.Spacer(background='blue', aspect_ratio=1)
grid_layout[0,2] = pn.Spacer(min_height=0, min_width=0, background='#FF0000', sizing_mode='stretch_height')
grid_layout[1,:] = pn.Spacer(background='green', max_height=300)

grid_layout.servable()
Philipp Rudiger
@philippjfr
So the behavior of the blue spacer when you reduce the window size seems expected. since it's trying to main the aspect but you'd expect it to increase in width to maintain aspect?
The green spacer is definitely not behaving right.
Martin Rindarøy
@rindis
In this gif: https://files.gitter.im/pyviz/pyviz/qIqg/not-ok-horizontal.gif I would expect the red spacers to shrink, allowing the blue spacer to fill the height while retaining aspect ratio of 1
Here: https://files.gitter.im/pyviz/pyviz/qIqg/not-ok-vertical.gif I would expect the green spacer to shrink
Philipp Rudiger
@philippjfr
Right, got you.
Philipp Rudiger
@philippjfr
Still struggling with it, mind making a Discourse post so it doesn't get lost and I can get back to it later?
Martin Rindarøy
@rindis
Will do
Thanks for helping!
Daniel Lima
@mindlessbrain
Hi, I am new to pyviz, and I am looking at holoviews for interactive plotting.
I am trying to remove the heatmap (hv.HeatMap) colors, something like color='white', or color=None. Does anyone know how could I do it?
Philipp Rudiger
@philippjfr
I'm not quite following, what would it mean to have a HeatMap without colors?
Daniel Lima
@mindlessbrain
It's because I wanna be able to tap on the cells and generate some callbacks. Plus, heatmaps are prettier than table formats.
Philipp Rudiger
@philippjfr
You could try fill_alpha=0
Daniel Lima
@mindlessbrain
Yeah, but when I set set fill_alpha=0, I lose the grid effects
I mean, the borders disappear
Philipp Rudiger
@philippjfr
hv.HeatMap(((1, 2, 3), (1, 2, 3), np.random.rand(3, 3))).opts(fill_alpha=0, line_alpha=1)
Daniel Lima
@mindlessbrain
@philippjfr thanks, helped a lot!
Also, do you know if it is possible to pass a mask for the colors? Something like cols[1:3] -> cmp_1, cols[3] -> cmap_2, cols[4:]-> cmap_3.
Sander van den Oord
@SandervandenOord
Nice that there is now discourse.holoviz.org!! :)
James A. Bednar
@jbednar
Thanks to @philippjfr.
Jacob Barhak
@Jacob-Barhak

Silly remark that confused me in documentation. If I have data dict that does not define x,y that I need to plot. How do I do it? some sore of dimension / relabel function? It took me an hour to figure out I needed kdims.
Here is the code that modified the simple example from http://holoviews.org/user_guide/Style_Mapping.html


import panel
import holoviews
from holoviews import opts
from bokeh.resources import INLINE


holoviews.extension('bokeh')
data = {
    'Param': [0, 1, 0.5],
    'Value': [1, 0, 0.5],
    'alpha': [0.5, 1, 0.3],
    'color': ['red', 'blue', 'green'],
    'marker': ['circle', 'triangle', 'diamond'],
    'size': [15, 25, 40]
}

opts.defaults(opts.Points(padding=0.1, size=8, line_color='black'))

Plot = holoviews.Points(data, vdims=['alpha', 'color', 'marker', 'size']).opts(alpha='alpha', color='color', marker='marker', size='size')

Out=panel.panel(Plot)
Out.save('TestOut', resources=INLINE) 
`

This code breaks. It took me about an hour to figure out that I should use kdims. like this:

Plot = holoviews.Points(data, kdims=['Param','Value'], vdims=['alpha', 'color', 'marker', 'size']).opts(alpha='alpha', color='color', marker='marker', size='size')

Do you thin its worthwhile changing the docs to use the dictionary that does not use x,y? Just to explain that those are defaults?

Its just an idea - I figured it may help newcomers.

Philipp Rudiger
@philippjfr
Seems reasonable or at least declare x, y as kdims explicitly.
Jacob Barhak
@Jacob-Barhak
Thanks @philippjfr , if you are ok with this, I can start a PR and make this minor modification when I finish coding my own code.
Philipp Rudiger
@philippjfr
Thanks!