How to show different text in plot annotation without overlapping for difference choice from pop up menu?

2 次查看(过去 30 天)
I want to show different equation in the GUI plot for different choice from another pop up menu. However, the message from different choices overlapped when I click for different choice. What command should I look into in order to avoid overlapping messages?
My command is as below:
syms x y a b c
switch quadric_choice
case 1
D = msgbox('Please choose one quadric surface.');
case 2
axes(handles.axes4);
D ='$\frac{x^2}{a^2}$ + $\frac{y^2}{b^2}$ + $\frac{z^2}{c^2}$ = 1';
annotation(gcf,'textbox',[0.03,0.81,0.1,0.1],'string',D,'interpreter','latex','FontSize',20,'FitBoxToText','on');
case 3
axes(handles.axes4);
D = '$\frac{x^2}{a^2} + \frac{y^2}{b^2} - \frac{z^2}{c^2} = 1$';
annotation(gcf,'textbox',[0.03,0.81,0.1,0.1],'string',D,'interpreter','latex','FontSize',20,'FitBoxToText','on');
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by