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

 채택된 답변

Cris LaPierre
Cris LaPierre 2018년 12월 7일

0 개 추천

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

Yu Li
Yu Li 2018년 12월 7일
thank you!
Yu Li
Yu Li 2018년 12월 7일
sorry to bother, I have one more question regarding this topic.
after adding this command, the axis disappear after I plot the figure, but is there anyway to make it invisible when I launch the app? which could make the windows display better?
Capture.JPG
Cris LaPierre
Cris LaPierre 2018년 12월 7일
Add the command I shared earlier in the startupFcn callback
Yu Li
Yu Li 2018년 12월 7일
a new problem becomes that, if add command:
axis(app.cylinder_plot,'off')
axis(app.cylinder_plot,'equal')
to the startupFcn, it is not availble to set the backgroud color by:
Color(app.cylinder_plot,'w') or app.cylinder_plot.Color='w'
is there any mistake with my operation?
Thanks!
Yu

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

추가 답변 (1개)

Cris LaPierre
Cris LaPierre 2018년 12월 7일
편집: Cris LaPierre 2018년 12월 7일

0 개 추천

That is correct. Turning the axis off prevents the background from showing.
In the Design View of app designer, try the following.
  1. Select your axes
  2. In the Axes Properties > Labels, remove the XLabel String and YLabel String
  3. In the Axes Properties > Ticks, remove the values in XTick and YTick
  4. 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.
  5. 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';

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

질문:

2018년 12월 7일

댓글:

2018년 12월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by