Drawnow for a single element (uilabel)
I’m trying to add a ‘status’ value to my MATLAB app, and have placed a uilabel to populate via a parallel.pool.DataQueue (with afterEach).
Unfortunately, it doesn’t refresh unless the UI completes an update, e.g. triggered by something like ‘drawnow’.
Other parts of my application have graphs that I’d rather not have replot at the same time – my main use of the status label will be to indicate that files are being loaded (often in the background, using parfeval), but if the data for the graphs is being loaded, I’d rather see the old/previous graphs until the next ones are ready.
Can I either exclude graphs from a drawnow command, or specify which ui elements I want to refresh?
If not, is there a sensible workaround here? (I can vaguely imagine tracking two sets of graphs, and not updating the data on the graph (or rather, the data being queried to place on the graph) until after the loading completes, but this seems likely to waste effort redrawing large numbers of points just to update a label, and also to be quite a bit harder to read…)
The uiprogressdlg seems to be modal – if I can make it embed in a uipanel or at least not block the uifigure, it would be a possibility, but mainly I’d like to update the status text whilst interacting with existing data on the graphs without really having to pay attention to the status text (a uiprogressdlg seems to act quite differently to that).I’m trying to add a ‘status’ value to my MATLAB app, and have placed a uilabel to populate via a parallel.pool.DataQueue (with afterEach).
Unfortunately, it doesn’t refresh unless the UI completes an update, e.g. triggered by something like ‘drawnow’.
Other parts of my application have graphs that I’d rather not have replot at the same time – my main use of the status label will be to indicate that files are being loaded (often in the background, using parfeval), but if the data for the graphs is being loaded, I’d rather see the old/previous graphs until the next ones are ready.
Can I either exclude graphs from a drawnow command, or specify which ui elements I want to refresh?
If not, is there a sensible workaround here? (I can vaguely imagine tracking two sets of graphs, and not updating the data on the graph (or rather, the data being queried to place on the graph) until after the loading completes, but this seems likely to waste effort redrawing large numbers of points just to update a label, and also to be quite a bit harder to read…)
The uiprogressdlg seems to be modal – if I can make it embed in a uipanel or at least not block the uifigure, it would be a possibility, but mainly I’d like to update the status text whilst interacting with existing data on the graphs without really having to pay attention to the status text (a uiprogressdlg seems to act quite differently to that). I’m trying to add a ‘status’ value to my MATLAB app, and have placed a uilabel to populate via a parallel.pool.DataQueue (with afterEach).
Unfortunately, it doesn’t refresh unless the UI completes an update, e.g. triggered by something like ‘drawnow’.
Other parts of my application have graphs that I’d rather not have replot at the same time – my main use of the status label will be to indicate that files are being loaded (often in the background, using parfeval), but if the data for the graphs is being loaded, I’d rather see the old/previous graphs until the next ones are ready.
Can I either exclude graphs from a drawnow command, or specify which ui elements I want to refresh?
If not, is there a sensible workaround here? (I can vaguely imagine tracking two sets of graphs, and not updating the data on the graph (or rather, the data being queried to place on the graph) until after the loading completes, but this seems likely to waste effort redrawing large numbers of points just to update a label, and also to be quite a bit harder to read…)
The uiprogressdlg seems to be modal – if I can make it embed in a uipanel or at least not block the uifigure, it would be a possibility, but mainly I’d like to update the status text whilst interacting with existing data on the graphs without really having to pay attention to the status text (a uiprogressdlg seems to act quite differently to that). matlab gui, drawnow MATLAB Answers — New Questions