App Designer UIAxes imagesc extremly slow. How can i plot it as axes or uiaxes from inside the app in an extra figure?

10 views (last 30 days)
after finisihing my App Designer App and implementing the plotting of the recordings as last step, i noticed that plotting with 10 Frames per second is impossible. The whole app stucks and the plotting is extremly slow and jumps over frames. After googling i found a subject about this issue in this forum. Now after creating the app in app designer this information is to late.
Now i tried to do it with uiaxes or normal axes. But both solutions doesn't work in App designer. App designer always wants UIAxes as handle.
First this is the loop for iterating over the frames:
for i=1:app.numTotalFrames
app.rdMapImage.XData = app.velocity_ticks;
app.rdMapImage.YData = app.range_ticks;
app.rdMapImage.CData = abs(app.rdMap(:,:,i)');
drawnow limitrate
This works but is not useable, because the performance ist very very bad. Not even 2 fps...
%Prebuild UIAxes with first Frame
app.rdMapImage = imagesc(app.UIAxes,app.velocity_ticks,app.range_ticks,abs(app.rdMap(:,:,1)'));
cBar = colorbar(app.UIAxes);
cBar.Label.String = "Normalized Power";
cBar.LimitsMode = 'manual';
cBar.Limits = [0 1];
xlim(app.UIAxes,[app.velocity_ticks(1) app.velocity_ticks(end)]);
ylim(app.UIAxes,[0 app.range_ticks(end)]);
ylabel(app.UIAxes,'Range [m]');
xlabel(app.UIAxes,'Velocity [m/s]');
I tried this with uiaxes and axes but imagesc wants UIAxes as container...
%Prebuild UIAxes with first Frame
app.fig = uifigure; = uiaxes(fig);
app.rdMapImage = imagesc(,app.velocity_ticks,app.range_ticks,abs(app.rdMap(:,:,1)'));
cBar = colorbar(;
cBar.Label.String = "Normalized Power";
cBar.LimitsMode = 'manual';
cBar.Limits = [0 1];
xlim(,[app.velocity_ticks(1) app.velocity_ticks(end)]);
ylim(,[0 app.range_ticks(end)]);
ylabel(,'Range [m]');
xlabel(,'Velocity [m/s]');
Now is there a posibillity that i can still use this app, with the performance of plotting it in a m-file. It's absolutely disappointing..

Answers (0)


Find more on Develop Apps Using App Designer in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by