- perform processing
- set figure
- drawnow
Print in script outputs figures before all lines above it done, and other issues
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
With print, can I force a "wait until catchup" in a script? It seems presently my script is printing deformed figures. They show fine as figures after the script execution is over, and print fine then. But the script that is supposed to output several images occasionally produces crap. Crap has been:
Parts missing from the figure
Priting parts of a wrong figure to a given file
Not getting aspects right (axis versus font sizes)
I generally use set(gcf,'WindowState','maximized') to set a consistent figure size in script, and output with print('-dpng',..)
If it matters, I am working from a network drive location, with two computers running two independent matlabs "homed" to the same folder. (Both computers operate from the same screen, in case that matters for aspects)
0 commentaires
Réponse acceptée
Nick
le 14 Nov 2018
A typical problem in GUI's with images or plots in an axes not updating can often be solved by adding a drawnow after the moment it should update. In your case my guess would be right before each print. In pseudo code it would look something like this in pseudo code:
I could misinterpred your question or it could be a different problem, hard to tell without sample code. If this does not solve the problem provide some sample code and example data.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Startup and Shutdown 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!