What's the difference between imagesc and imshow?

T
Timothy · Dec 24, 2020 · 3.6K views
Question
Hi, When I want to display an image in figure screen, both works the same way. I was wondering what's the difference between both imagesc and imshow commands?
Expert Answer
Profile picture of Prashant Kumar
Prashant Kumar PhD Expert
Answered Aug 20, 2026

imshow has a number of default settings intended for displaying images, such as turning off the axes and locking the aspect ratio, that imagesc does not. imshow also had additional options for customizing how you view the image that are not available or not as easily doable through imagesc. You can see the basic differences by doing something like the following and looking at the two figures side by side.

>> imagesc(myimage)
>> figure
>> imshow(myimage)

You can get full details on the functions and their usages through their documentation pages.

>> doc imagesc
>> doc imshow

Finally you can view the source code for both if interested.

>> edit imagesc
>> edit imshow
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!