Question

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

Was it helpful?

Solution

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',[])

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top