How to insert Xlabel and Ylabel into axes when designing GUI ?
조회 수: 24 (최근 30일)
이전 댓글 표시
I made 2 axes by GUI design.
And i want to insert X,Y label into axes respectivly.
first axes Xlabel : frequency Ylabel : Magnitude
senconde axes Xlabel : frequecny Ylabel : Phase
the command "Xlabel" and "Ylabel" are not working in the GUIde.
댓글 수: 0
답변 (3개)
Hengameh Noshahri
2015년 10월 14일
you can try following code in your user code:
plot(handles.axes,x,y);
xlabel(handles.axes,'xlabel')
ylabel(handles.axes,'ylabel')
댓글 수: 0
Amardeep
2011년 12월 8일
I place on static text boxes which I change the string handle of. Not massively elegant but it works.
댓글 수: 0
Image Analyst
2012년 12월 24일
It's case sensitive. You need to use xlabel and ylabel, not Xlabel and Ylabel:
fontSize = 20; % Whatever you want.
% First for the first axes:
axes(handles.axes1);
xlabel('Frequency', 'FontSize', fontSize);
ylabel('Magnitude', 'FontSize', fontSize);
% Now for the second axes:
axes(handles.axes2);
xlabel('Frequency', 'FontSize', fontSize);
ylabel('Phase', 'FontSize', fontSize);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Visual Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!