Frage

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

War es hilfreich?

Lösung

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

Andere Tipps

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top