Increase the plotting performance in datacursormode

1 次查看(过去 30 天)
Hello,
I am trying to plot the figure with many possible architectures in a graph. However, beacuase of having millions of architectures, plotting is not at all efficient.
Before introducing the datacursormode for getting the details of the points, plotted into the figure, the graph was smoothly generated even for 115 millions of architectures. But after bringing the datacursormode, it is not even working for 354295 number of architectures.
Here my code is:
%Plotting the tradespace and pareto frontier with corresponding architectures
Utopia = UtilityHighRange; % for plotting purposes add Utopia point
plot(archs_cost(1),archs_util(1),'b.','Tag',sprintf('ix %d\n%s',1, join(archs(1,:))) )
hold on % moved up from below
for n = 2:n_arch
plot(archs_cost(n),archs_util(n),'b.','Tag',sprintf('ix %d\n%s',1, join(archs(n,:))) )
end
datacursormode on
dcm = datacursormode(gcf);
set(dcm,'UpdateFcn',@myupdatefcn)
xlabel('Cost')
ylabel('Utility')
xlim([CostLowerRange CostHighRange])
ylim([UtilityLowerRange UtilityHighRange])
title('Trade Space Pareto')
hold on
plot(Utopia,'pg','LineWidth',5)
annotation('textarrow',[0.1657 0.1357],[0.8738 0.9238],'String','Utopia')
plot(pareto_frontier(1, 2), pareto_frontier(1, 3), 'rs', 'LineWidth', 3, 'Tag', sprintf('ix %d\n%s', 1, join(pareto_frontier_archs(1, :))))
hold on
for n = 2:frontier_idx
plot(pareto_frontier(n:frontier_idx, 2), pareto_frontier(n:frontier_idx,3), 'rs', 'LineWidth', 3, 'Tag', sprintf('ix %d\n%s', 1, join(pareto_frontier_archs(n, :))))
end
datacursormode on
dcm = datacursormode(gcf);
set(dcm, 'UpdateFcn', @myupdatefcn)
hold off
in above code, n_arch = 354294 and it is flexible to increase and decrease. And it can reach to its highest capacity of 115 millions.
Now, when with datacursormode on, I am running this code, the figure is being plotted but in the distorted manner. Upto some extent, it works and after some time, Matlab becomes unresponsive and then I need to restart the application everytime.
It would be really appreciated if anyone of you could help me sort this issue and improve the performance of the plotting the data in the code. It is really very necessary as I ended up several times with my computer getting restart although having very high configuration(RAM 16 GB).
Thank you.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by