필터 지우기
필터 지우기

How to do scatter/plot overlaying an imagesc/pcolor plot?

조회 수: 71 (최근 30일)
Michael
Michael 2015년 8월 25일
댓글: Adam 2015년 8월 26일
I have a matrix (200 x 200), which I do: imagesc(v(1:200),v2(1:200), matrix); This is an extrapolated Matrix, and now I wish to scatter / plot my data point observations locations on top of this matrix field.
How would I go about doing this? I thought maybe I could imagesc a matrix of the scattered observation with increased transparency? but I guess there must be a better way to do this..

답변 (1개)

Image Analyst
Image Analyst 2015년 8월 25일
Don't use pcolor() unless you're happy not displaying the last row and column of your image.
To overlay one image on top of another, see these links:
To plot or scatter points, then just call hold on and then scatter() or plot():
imshow(yourImage);
hold on;
plot(x,y, 'rd', 'MarkerSize', 30); % Plot red diamonds over image.
  댓글 수: 2
Michael
Michael 2015년 8월 26일
Thanks for your help, however, I am not using images, I am using imagesc (although, now contourf) to display data. How would I do it in this case?
Adam
Adam 2015년 8월 26일
The general idea should be the same whatever function you are using to plot your image data.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by