I have a 15x15 image of a grid of numbers which I have shown using imagesc. However, the axis goes up to 450 in both directions, when I only want it to go up to 15. I tried:
axis/30;
But that doesn't do anything? All I want to do is divide the x and y axes by 30!
The problem is, I presume, that although your image shows 15 numbers along in each axes, the total size of your image in pixels is 450 x 450 - and this is what
imagesc
is using.So, what you really have is an image with 15 x 15 blocks of 30 x 30 pixels. You can set the axes ticks and labels manually using
XTick
andXTickLabel
: