sagar87 / spatialproteomics

Spatialproteomics is a light weight wrapper around xarray with the intention to facilitate the data exploration and analysis of highly multiplexed immunohistochemistry data. Docs available here: https://sagar87.github.io/spatialproteomics/ .
https://sagar87.github.io/spatialproteomics/
MIT License
13 stars 0 forks source link

Issue with background color #49

Closed MeyerBender closed 5 months ago

MeyerBender commented 5 months ago

The background color works when only a single channel is selected, but is behaving weirdly with two or more channels. Example:

plt.figure(figsize=(10, 10))
_ = img_full.pp[['DAPI', 'Na/K ATPase']].pl.colorize(['orange', 'deepskyblue'], background="darkgray").pl.autocrop().pl.show()
plt.xticks([])
plt.yticks([])
plt.tight_layout()

image

MeyerBender commented 5 months ago

Need to check if this only affects pl.colorize() or if pl.render_segmentation() needs fixing as well.

MeyerBender commented 5 months ago

One possible fix could be to only set a background color for the first channel and set it to be transparent for all other channels. If this works, we could also have completely transparent backgrounds, which would be really cool and useful for pasting images into presentations etc.

MeyerBender commented 5 months ago

Fixed in #58.