Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matlab `imagesc`: how to display with smooth colors?

I have a matrix which I display with imagesc. Now I'm asked to make an "interpolated" version (i.e. display with smoother colors).

While I could compute a larger interpolated matrix, I seem to remember that there was a command to switch between two such display modes, either a little command in the style of axis equal or some Property - but I just cannot find it.

like image 626
cbeleites unhappy with SX Avatar asked Sep 29 '11 11:09

cbeleites unhappy with SX


1 Answers

You may want to use pcolor instead of imagesc and set the shading properties to interp.

Note that pcolor and imagesc will not display your data in the same way but the shading property is only available for faceted plots.

However this is only a display solution, you will have to interpolate your data if you want to work with it afterwards.

like image 159
Aabaz Avatar answered Oct 04 '22 21:10

Aabaz