App Designer | hold on does not work as expected

87 vues (au cours des 30 derniers jours)
Kathy Primakova
Kathy Primakova le 17 Mai 2022
Commenté : Kathy Primakova le 17 Mai 2022
In live scripts or simple matlab code I normaly draw slice and two plot3 graphics in one axes:
but, using App Designer, it cant draw normally:
1 - only slice, 2 - slice and 2 plot3, 3 - slice and one plot3
code for App Designer: (V - 3-d matrix)
hold on;
colormap(app.fullaxes, map);
s = slice(app.fullaxes, app.y_3, app.x_3, app.z_3, app.V, 0,0,15);
set(s, 'EdgeAlpha',0.1);
plot3(app.fullaxes, y_1, x_1, z_1, 'Color', app.color_2);
plot3(app.fullaxes, y_2, x_2, z_2, 'Color', app.color_3);
hold off;

Réponse acceptée

Kevin Holly
Kevin Holly le 17 Mai 2022
I believe you need to specify the axes of your hold on. Please let me know if this works.
hold(app.fullaxes,'on');
colormap(app.fullaxes, map);
s = slice(app.fullaxes, app.y_3, app.x_3, app.z_3, app.V, 0,0,15);
set(s, 'EdgeAlpha',0.1);
plot3(app.fullaxes, y_1, x_1, z_1, 'Color', app.color_2);
plot3(app.fullaxes, y_2, x_2, z_2, 'Color', app.color_3);
hold(app.fullaxes,'off');
  1 commentaire
Kathy Primakova
Kathy Primakova le 17 Mai 2022
Thank You very much !!! Now it works great)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by