Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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

Risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by