How to use selections? #1986
-
Hi, I like to plot a selection of my data, but I can't figure out how that works with the viz.heatmap. So the following works
but I think this runs through the data 3 times? Maybe not, but the docs may tell me not to do it this way? I really have trouble with the docs on this topic. Anyway, I saw the select method and I think the docs argue that this should be better (?), but I can't get it to work:
the last one seems completely miss guided, it seems in that case maxage and depth are not defined anymore.
The others mostly throw an error related to some recursion
So, does one use Best |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hi, here are some examples, i trust examples would be more valuable than explaining things in words: # Get example data
import vaex
df = vaex.example()
# option 1: using selections
df.select('x > 5')
df.viz.heatmap('x', 'y', selection='default', f='log1p')
# option 2: using selections with custom names
df.select('x > 5', name='my_sel')
df.viz.heatmap('x', 'y', selection='my_sel', f='log1p')
# option 3: with a string expression directly in the viz method
df.viz.heatmap('x', 'y', selection='y < 0', f='log1p')
# option 4: as a vaex expression directly in the viz method
df.viz.heatmap('x', 'y', selection='y < 0', f='log1p') There are some advanced plotting examples in the docs. Hope this helps. |
Beta Was this translation helpful? Give feedback.
Hi, here are some examples, i trust examples would be more valuable than explaining things in words:
There are some advanced plotting examples in the docs.
Hope this…