uifigure() laggy with multiple axes, figure() does not support scrollable components
I made an interface to display data from multiple measurement channels. It’s using a Grid Layout Manager, so the first column with fixed pixel width contains channel options, and the second column with "1x" width has axes displaying data. It is Y-scrollable so it can display many channels no matter the window size.
But it gets laggy and possibly unusable when displaying just 10 channels. But I actually found that displaying the same amount of channels in a figure() window is not laggy at all.
But figure() does not support Grid Layout Manager, nor scrollable uipanel…
nb_points = 50e3;
nb_linesperaxes = 1;
nb_axes = 15;
fig = figure("Name","figure()");
fig_ax = arrayfun(@(k)axes(fig,"OuterPosition",[0,1-k/nb_axes,1,1/nb_axes]),…
1:nb_axes);
arrayfun(@(ax)plot(ax,linspace(0,1,nb_points),randn(nb_points,nb_linesperaxes)),…
fig_ax,’UniformOutput’,false);
linkaxes(fig_ax,’x’)
zoom(fig_ax(1),’xon’)
pan(fig_ax(2),’xon’)
uifig = uifigure("Name","uifigure()");
uifig_ax = arrayfun(@(k)axes(uifig,"OuterPosition",[0,1-k/nb_axes,1,1/nb_axes]),…
1:nb_axes);
arrayfun(@(ax)plot(ax,linspace(0,1,nb_points),randn(nb_points,nb_linesperaxes)),…
uifig_ax,’UniformOutput’,false);
linkaxes(uifig_ax,’x’)
zoom(uifig_ax(1),’xon’)
pan(uifig_ax(2),’xon’)
The figure() window works wells, whereas the uifigure() window is laggy. Once compiled as app, it’s even unusable on some not-too-old computers.
Is there an alternative to Grid Layout Manager or scrollable Panel for figure() windows ?
Is there any way to prevent uifigure() window being this laggy ?I made an interface to display data from multiple measurement channels. It’s using a Grid Layout Manager, so the first column with fixed pixel width contains channel options, and the second column with "1x" width has axes displaying data. It is Y-scrollable so it can display many channels no matter the window size.
But it gets laggy and possibly unusable when displaying just 10 channels. But I actually found that displaying the same amount of channels in a figure() window is not laggy at all.
But figure() does not support Grid Layout Manager, nor scrollable uipanel…
nb_points = 50e3;
nb_linesperaxes = 1;
nb_axes = 15;
fig = figure("Name","figure()");
fig_ax = arrayfun(@(k)axes(fig,"OuterPosition",[0,1-k/nb_axes,1,1/nb_axes]),…
1:nb_axes);
arrayfun(@(ax)plot(ax,linspace(0,1,nb_points),randn(nb_points,nb_linesperaxes)),…
fig_ax,’UniformOutput’,false);
linkaxes(fig_ax,’x’)
zoom(fig_ax(1),’xon’)
pan(fig_ax(2),’xon’)
uifig = uifigure("Name","uifigure()");
uifig_ax = arrayfun(@(k)axes(uifig,"OuterPosition",[0,1-k/nb_axes,1,1/nb_axes]),…
1:nb_axes);
arrayfun(@(ax)plot(ax,linspace(0,1,nb_points),randn(nb_points,nb_linesperaxes)),…
uifig_ax,’UniformOutput’,false);
linkaxes(uifig_ax,’x’)
zoom(uifig_ax(1),’xon’)
pan(uifig_ax(2),’xon’)
The figure() window works wells, whereas the uifigure() window is laggy. Once compiled as app, it’s even unusable on some not-too-old computers.
Is there an alternative to Grid Layout Manager or scrollable Panel for figure() windows ?
Is there any way to prevent uifigure() window being this laggy ? I made an interface to display data from multiple measurement channels. It’s using a Grid Layout Manager, so the first column with fixed pixel width contains channel options, and the second column with "1x" width has axes displaying data. It is Y-scrollable so it can display many channels no matter the window size.
But it gets laggy and possibly unusable when displaying just 10 channels. But I actually found that displaying the same amount of channels in a figure() window is not laggy at all.
But figure() does not support Grid Layout Manager, nor scrollable uipanel…
nb_points = 50e3;
nb_linesperaxes = 1;
nb_axes = 15;
fig = figure("Name","figure()");
fig_ax = arrayfun(@(k)axes(fig,"OuterPosition",[0,1-k/nb_axes,1,1/nb_axes]),…
1:nb_axes);
arrayfun(@(ax)plot(ax,linspace(0,1,nb_points),randn(nb_points,nb_linesperaxes)),…
fig_ax,’UniformOutput’,false);
linkaxes(fig_ax,’x’)
zoom(fig_ax(1),’xon’)
pan(fig_ax(2),’xon’)
uifig = uifigure("Name","uifigure()");
uifig_ax = arrayfun(@(k)axes(uifig,"OuterPosition",[0,1-k/nb_axes,1,1/nb_axes]),…
1:nb_axes);
arrayfun(@(ax)plot(ax,linspace(0,1,nb_points),randn(nb_points,nb_linesperaxes)),…
uifig_ax,’UniformOutput’,false);
linkaxes(uifig_ax,’x’)
zoom(uifig_ax(1),’xon’)
pan(uifig_ax(2),’xon’)
The figure() window works wells, whereas the uifigure() window is laggy. Once compiled as app, it’s even unusable on some not-too-old computers.
Is there an alternative to Grid Layout Manager or scrollable Panel for figure() windows ?
Is there any way to prevent uifigure() window being this laggy ? figure, uifigure, performance, laggy, scrollable, grid layout manager MATLAB Answers — New Questions