axis off in App designer
조회 수: 44 (최근 30일)
이전 댓글 표시
is there anyway to set the axis 'invisible' in App Designer?
similiar is 'axis equal'....
I looked around in the link below but could not find anyway to do that.
https://www.mathworks.com/help/matlab/ref/matlab.ui.control.uiaxes-properties.html
Yu
댓글 수: 0
채택된 답변
Cris LaPierre
2018년 12월 7일
Do you want the axis off or equal? Using axis equal will not turn the axis off.
Try adding this line, modifying the axis handle to match your name.
axis(app.UIAxes,'off')
댓글 수: 4
추가 답변 (1개)
Cris LaPierre
2018년 12월 7일
편집: Cris LaPierre
2018년 12월 7일
That is correct. Turning the axis off prevents the background from showing.
In the Design View of app designer, try the following.
- Select your axes
- In the Axes Properties > Labels, remove the XLabel String and YLabel String
- In the Axes Properties > Ticks, remove the values in XTick and YTick
- If you want a box around plot, in Axes Properties > Box Styling select the Box checkbox. You can pick the box color there as well.
- You'll notice that the background color is already white (default)
In your startupFcn callback add
axis(app.UIAxes,'equal')
% if you don't want the black lines for the axes, include:
app.UIAxes.XColor = 'w';
app.UIAxes.YColor = 'w';
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!