문제

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

도움이 되었습니까?

해결책

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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top