Custom axis scale and colorbar form imagesc

86 次查看(过去 30 天)
Hi,
I have an image I'm displaying with imagesc. By default, Matlab gives you the x and y axis of the pixel number. So if I have a 500x400 image, the y and x scale will go frim 1 to 500 and 1 to 400.
Instead, I would like that those axis show me the position in mm. My 500x400 image represent a real image of 10mm x 8mm. I would like my axis to show me values ranging from 0 to 10mm and 0 to 8mm. Is it possible in Matlab?
Furthermore, is is possible to have a log scale colorbar? I display the log10(image) values instead of image values and it would be nice to have the colorbar showing the real values.
Thank you for the help.
RMT

采纳的回答

Raphaël
Raphaël 2018-11-23
imagesc(x,y,image)
where
-image is a 2D matrix cointaining the data
-x is a two value vector corresponding to the start and end of the scaling, x = [0 8]
-y is a two value vector corresponding to the start and end of the scaling, y = [0 10]

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Blue 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by