How can I plot a cube with different images projected on each face?

5 次查看(过去 30 天)
I have a hyperspectral data cube, DATCUBE, where size(DATCUBE)=[512,512,128]. I would like to create a 3d plot that looks like a cube where each face shows the sum or mean of the cube in the relevant directions.
So the top of the cube, parallel to the x/y plane would have an image of sum(DATCUBE,3) projected onto it, and the right side of the cube (parallel to the y plane) would be an image of squeeze(sum(DATCUBE,2)), etc...
I think I could write code to do this by looping through the data and making patches, but that sounds pretty convoluted and surely somebody has done this before. While searching for this functionality, I found code to project plots on cube faces in python, but not matlab which I found surprising.
There is an example similar to what I want to create on this website about halfway down the page:

采纳的回答

Matt J
Matt J 2023-5-1

更多回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by