Could/should we have some trace type that would be equivalent to matplotlib's imshow() for showing full-color images? https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imshow.html
basically heatmap but with r,g,b channels or something?
cc @jonmmease @emmanuelle
I feel like this would help Python adoption, as this comes up every once in a while.
Thinking out loud here... imshow accepts either a single-channel vector, or RGB or RGBA, but we in principle could also accept HSV or other color-space specifications. This would allow us to do some cool combined-colormap type stuff where hue is mapped to one vector and lightness to another.
this kind of thing https://en.wikipedia.org/wiki/Domain_coloring

I'm for it - I really like the idea of being able to specify 3 (or 2 or 4) 2D arrays and specifying whether they're RGB, HSV, HSL, or whatever. I had some instances in grad school of multiple independent 2D channels of data I wanted to overlay... never did find a mapping that was intelligible for 3 channels but for 2 channels either R+G, R+B, or L+H worked fairly well in my case.
It would be great, yes!
RGB channels for a start would be enough for 99% cases I think
The third example on this page shows how a rastermapbox related trace type might work: http://datashader.org/topics/gerrymandering.html
@nicolaskruchten it would be so useful to computer vision in python! hope to see it soon. Thanks!
it would be so useful to computer vision in python! hope to see it soon. Thanks!
@YoniChechik for your use cases are there additional features you would find valuable in this new trace type?
@antoinerg , I think that a good line to follow is matplotlib.pyplot.imshow.
Key functions not to be missed IMHO are:
bokeh the original image aspect ratio, or "equal" ratio, if needed.heatmap, with easy ability to change color limit min and max (default is data min and max). 3D/4D (RGB/A) input should be default to np.uint8 ([0,255]) or other types which will be in range [0,1].Initial discussion with team:
z which is a "2-d array of 3- or 4-tuples"image trace types, yaxis.autorange = 'reversed' image and heatmapNice job @antoinerg ! Can you please create a new "image future directions" issue that captures all the stuff that didn't make it into this version?
Most helpful comment
@antoinerg , I think that a good line to follow is
matplotlib.pyplot.imshow.Key functions not to be missed IMHO are:
bokehthe original image aspect ratio, or "equal" ratio, if needed.heatmap, with easy ability to change color limit min and max (default is data min and max). 3D/4D (RGB/A) input should be default tonp.uint8([0,255]) or other types which will be in range [0,1].