fastscatter.m

버전 1.3.0.0 (1.03 KB) 작성자: Aslak Grinsted
A much faster scatterplot
다운로드 수: 1.3K
업데이트 날짜: 2014/7/29

라이선스 보기

A fast scatter plot

h=fastscatter(X,Y,C [,markertype,property-value pairs])

Inputs:
X,Y: coordinates
C: color


Examples:
N=100000;
fastscatter(randn(N,1),randn(N,1),randn(N,1))

N=100;
fastscatter(randn(N,1),randn(N,1),randn(N,1),'+','markersize',7)
______________________________________
An illustrative example of the speed-up when using fastscatter over scatter:
N=200000;
X=randn(N,1);Y=randn(N,1);C=X.^2+Y.^2+randn(N,1);S=ones(N,1);
tic; for ii=1:10, clf; fastscatter(X,Y,C); drawnow; end; fastscatter_time=toc
tic; for ii=1:10, clf; scatter(X,Y,S,C); drawnow; end; regularscatter_time=toc
speed_increase=regularscatter_time/fastscatter_time

fastscatter_time = 3.4 seconds
regularscatter_time = 63.3 seconds
speed_increase = 18x

And for N=400000, the performance boost was ~38x.

인용 양식

Aslak Grinsted (2024). fastscatter.m (https://www.mathworks.com/matlabcentral/fileexchange/47205-fastscatter-m), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2014a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Discrete Data Plots에 대해 자세히 알아보기
도움

줌: fastscatterm

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.3.0.0

bug fix... too fast with submit

1.2.0.0

Updated description

1.1.0.0

Improved performance and nan-handling.

1.0.0.0