Closed brendancol closed 4 years ago
I'd really just suggest to switch to the rasterize operation. Don't think datashade with histogram equalization is appropriate for this data.
Cool, thanks @philippjfr , done. I could not set the colormap though. Any suggestion?
When rasterized the colormap is set as a style option using .opts(cmap=...)
@brendancol Branch skyplot_colorbar has the skyplot with colorbar (viridis). It is using rasterize
and viridis
. It is not using any spreading though, to be solved.
@philippjfr This is the code in question here. I would think we need a shade
call after rasterize:
https://github.com/Quansight/lsst_dashboard/blob/skyplot_colorbar/lsst_dashboard/plots.py#L397-L405
@brendancol Fixed the datapoints spreading limitation when using colorbar in Skyplot in commit b6db1dc286271e654abb7082a9899a385c8a71c7 of branch skyplot_colorbar
; not yet merged to master because there are some widgets in need for styling, but branch is running stable.
The overall solution is to (go back and) use datashade()
+ dynspread()
, and over it (like decimate()
) we use a transparent rasterize()
, to which we can associate a colorbar. The layers use the same colormap and aggregator.
Once we have the widgets therein decently styled we can merge to master and close here.
shade()
it (to have the datashade()
result)@chbrandt thanks for the hint!
I'm using something like:
import holoviews.operation.datashader as hds
raster = hds.raster(data).opts(alpha=1,colorbar=True)
raster*\
background_image\*
hds.shade(raster).opts(alpha=0.7)
because in my case I found the setting alpha=0
to raster
apply to the colorbar too.
This way raster
is covered by the the hds.shade(raster)
anyway, plus I have a background image.
This is a work-around Tim itself considered to have the skyplot colorbar.