Lifemap.layer_screengrid
=30, extruded=False, opacity=0.5) Lifemap.layer_screengrid(cell_size
Add a screengrid layer.
This layer is used to display observations distribution. It should be noted that the visualization is highly sensitive to the zoom level and the map extent.
Parameters
Name | Type | Description | Default |
---|---|---|---|
cell_size | int | Screen grid cell size, in pixels, by default 30 | 30 |
extruded | (bool, optionals ) |
If True, show the grid as extruded, by default False | False |
opacity | float | Screengrid opacity as a floating point number between 0 and 1, by default 0.5 | 0.5 |
Returns
Name | Type | Description |
---|---|---|
Lifemap | A Lifemap visualization object. |
Examples
>>> import polars as pl
>>> from pylifemap import Lifemap
>>> d = pl.DataFrame({
"taxid": [9685, 9615, 9994, 2467430, 2514524, 2038938, 1021470, 1415565, 1928562, 1397240, 230741],
...
... })>>> (
... Lifemap(d)
... .layer_screengrid()
... .show() ... )