Azzera filtri
Azzera filtri

unable to adjust real time views of surf plots in plot-drawnow animations

2 visualizzazioni (ultimi 30 giorni)
In plot-drawnow animations, how to use the mouse to adjust the view of a 3d surf plot? I've found that there's no response to any real time mouse adjustment and the view stays unchanged.
  5 Commenti
feynman feynman
feynman feynman il 27 Feb 2024
a followup question, rotate3d on doesn't seem to play well in live scripts when figures aren't shown in a separate file! Once rotate3d on, animations disappear but only the final screenshot is retained. Any solution?

Accedi per commentare.

Risposte (1)

Benjamin Kraus
Benjamin Kraus il 27 Feb 2024
Modificato: Benjamin Kraus il 27 Feb 2024
@Vinayak has the right idea, although pause should be unnecessary and drawnow is definitely the preferred approach.
  • drawnow will guarantee that the graphics are drawn and MATLAB responds to any user interactions or callbacks that occured during your loop.
  • pause will pause execution for a moment which may give graphics a chance to update, and may respond to callbacks, but if MATLAB has't finished drawing or responding to callbacks before the time expires, it does not guarantee that these things occur.
You can use both pause and drawnow if you want to both guarantee that each frame draws, but also slow down the loop if it is running too quickly.
  1 Commento
feynman feynman
feynman feynman il 28 Feb 2024
Thanks a lot! A followup question, rotate3d on doesn't seem to play well in live scripts when figures aren't shown in a separate file! Once rotate3d on, animations disappear but only the final screenshot is retained. Any solution?

Accedi per commentare.

Categorie

Scopri di più su Animation in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by