Hey guys,
I ahve been trying to develop a GUI for a project. My problem is a couple of small lines perpendicular to the length and width of the GUI which are not supposed to show up. Please see the figure below.
I would greatly appreciate your help.
Thank you

 채택된 답변

Jan
Jan 2019년 3월 12일
편집: Jan 2019년 3월 12일

0 개 추천

This looks the ticks of an axes object, which fills the complete figure. Either remove this axes object, if you do not need it, or remove the ticks:
AxesH = axes( ...
'Parent', FigH, ...
'Units', 'normalized', ...
'Position', [0, 0, 1, 1], ...
'Visible', 'off', ...
'XTick', [], 'YTick', [], ... % <---
'NextPlot', 'add', ...
'HitTest', 'off');
It would be useful to mention, if you create the GUI by GUIDE, AppDesigner or programmatically.

댓글 수: 5

Thank you for the answer.
I used guide to create it. Just now I tried to use your code, but I don't know where should I paste your codes? I paseted it into the main function but it returns several errors. I mean there are several functions in the developed GUI, your codes should be pasted into which function?
I just solved the issue by making some settings in the axes. Actually I chose the same colors for XTick and YTick.
Thank you
Jan
Jan 2019년 3월 12일
Setting XTick and YTick to the empty matrix will be smarter, because it is not affected by a change of the default colors. Did you create the axes in GUIDE? Then you do not need my code, but you can set the properties of the axes in GUIDE also. By the way: Do you need this axes at all? The screenshot dows not contain any text() objects, such that I assume you can delete the axes.
You are right. Actually, I created this axes just to have a background color in my GUI, other than that they do not do anything special for me. And, I created this GUI using GUIDE in MATLAB.
Jan
Jan 2019년 3월 13일
You can set the background color of the figure directly.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

질문:

2019년 3월 12일

댓글:

Jan
2019년 3월 13일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by