Effacer les filtres
Effacer les filtres

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

6 vues (au cours des 30 derniers jours)
Alan Hoskins
Alan Hoskins le 1 Mai 2023
Commenté : Alan Hoskins le 1 Mai 2023
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:

Réponse acceptée

Matt J
Matt J le 1 Mai 2023

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by