Farhat Mann
Farhat Mann

Reputation: 283

How to delete the axes coordinate in Matlab GUI?

I want to make a Matlab GUI program. When i use the axes to display the image, there are the axes number around the axes.

How to delete it? so my GUI program will display the axes without any coordinates around the axes.

here is my code for display an image in axes.

 axes(handles.axes16);
 handles.image_gray = image_gray;
 imshow(image_gray);
 guidata(hObject, handles);

And here is the axes coordinates that i meant.

enter image description here

Upvotes: 1

Views: 6003

Answers (2)

dsgrnt
dsgrnt

Reputation: 393

Remember that the axes is an handle object with many properties. I would recommend setting the axes properties 'xtick', and 'ytick', to an empty array. That way, you preserve the border, and background color of the axes. Simply turning the axes off will make your lines render on top of the background figure, which may or may not be the effect you are looking for.

Example:

set(handles.axes16,'xtick',[],'ytick',[])

Upvotes: 3

Buck Thorn
Buck Thorn

Reputation: 5073

A quick way to turn off the axis is, well, axis off:

Example

figure;
plot([-10:10],randn(21,1));
xlabel('x');
ylabel('y');

enter image description here

Now turn axis off:

axis off

enter image description here

Upvotes: 1

Related Questions