フィルターのクリア

Plotting beyond memory capabilities

2 ビュー (過去 30 日間)
Kambren Rowlan
Kambren Rowlan 2017 年 7 月 27 日
回答済み: Steven Lord 2017 年 9 月 22 日
I'm looking for a way to dynamically plot a large dataset.
It should be able to behave like this:
I plot 3 segments of the data with a window that views 1 of them, the window can be adjusted to view half of segment 2 and segment 3
when the view is moved far enough into segment 3 then the plot bounds will update and segment 1 will be throw out of memory and segment 4 added so that it will function the same but now will be looking further down the data.
Essentially I have more data than can comfortable fit in memory and I want to visualize it (not necessarily all at once) but not have to continually generate new plots. It is also important to be able to pretend like the separation of the data doesn't exist when viewing.

回答 (2 件)

KSSV
KSSV 2017 年 7 月 28 日
編集済み: KSSV 2017 年 7 月 28 日
% some random data
x = rand(1000,1) ;
y = rand(1000,1) ;
z = rand(1000,1) ;
% reshape to plot them in small chunks
X = reshape(x,10,[]) ;
Y = reshape(y,10,[]) ;
Z = reshape(z,10,[]) ;
% 2D plot
h = plot(nan,nan,'r') ;
% 3D plot
% h = plot3(nan,nan,nan,'r') ;
% loop for each chunk
for i = 1:size(X,1)
% 3D
% set(h,'XData',X(:,i),'YData',Y(:,i),'ZData',Z(:,i)) ;
% axis([min(X(:,i)) max(X(:,i)) min(Y(:,i)) max(Y(:,i)) min(Z(:,i)) max(Z(:,i))])
% 2D
set(h,'XData',X(:,i),'YData',Y(:,i)) ;
axis([min(X(:,i)) max(X(:,i)) min(Y(:,i)) max(Y(:,i))])
drawnow
pause(0.1)
end

Steven Lord
Steven Lord 2017 年 9 月 22 日
If you have data that is too large to fit in memory that you want to plot, see if you can update to release R2017b. We added support for tall arrays to the plot, scatter, and binscatter functions in that release.

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by