Setting axis properties is cropping my graphic (imagesc)
Show older comments
Hello :)
I am using imagesc to get a scaled coloured map of a matrix. I also want to decide the possibles values for the x and y axis.
When I try to set them using the following code, I get a graphic that is cropped in half (half of it is white, the other is coloured). Here is the code :
imagesc(matrixA(:,:,1),[0 1]);
set(gca,'XLim',[0 1],'XTick',0:0.1:1)
It is hard for me to tell if the image is cropped or if it is fitted to half the space...
I did try to search on MathWorks answers and on the internet, but to no avail for now. What am I doing wrong? Have you ever had a similar problem? Reading the doc leaves me clueless as to what the problem can be.
Thank you and have a most wonderful day!
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!