anon
anon

Reputation:

Displaying axis values with matlab

I am displaying an image:

% Load some image:
data = imread(srcPath);

% display the image:
figure;
imshow(data);
axis image;

Is there anyway to get some example values near the axis?

Ignore the messagebox:

Basically this is the output using

imagesc(data);

But I wouldn't use imagesc just to display axis like that

Upvotes: 0

Views: 95

Answers (1)

HerrKaputt
HerrKaputt

Reputation: 2604

What you want is done through the attributes xtick for horizontal axis and ytick for vertical axis. You have to use the set(gca, ...) syntax to do it. There are some good examples in the documentation.

Upvotes: 1

Related Questions