필터 지우기
필터 지우기

Scatterplot, i need to plot one point instead of 4 present in my table

조회 수: 1 (최근 30일)
Emiliano Ascenzi
Emiliano Ascenzi 2020년 1월 30일
댓글: Emiliano Ascenzi 2020년 1월 31일
scatter(A, B, 1, C)
cb = colorbar();
set(gca,'clim',[0 50])
This is my original plot. A,B,C are table columns of same lenght (500k rows, containing latitude, longitude and value correspondent). I need to draw a scatter of 500k/4 x 500k/4 instead of 500k x 500k, every four near points on the original scatter must became a single point and his value (on C) must be the mean value of the four points. How can i do that?
This describes my problem, but i don't have a continuos signal, some points are missing
  댓글 수: 4
Adam Danz
Adam Danz 2020년 1월 31일
How are your data arranged? Do you have a vector of x values, a vector of y values, and a vector of color scale values?
Emiliano Ascenzi
Emiliano Ascenzi 2020년 1월 31일
A is a vector of x values, B is a vector of y values, C color scale values

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

답변 (1개)

the cyclist
the cyclist 2020년 1월 30일
If I understand correctly, you want to do the following:
A_mean = mean(reshape(A,4,[]))';
B_mean = mean(reshape(B,4,[]))';
C_mean = mean(reshape(C,4,[]))';
and plot those instead of your original variables.
  댓글 수: 3
the cyclist
the cyclist 2020년 1월 30일
OK, I guess I did not understand your original question, then.
When you say 4 points "near" each other in your question, do you mean the vector indices are near each other (e.g. the 1st, 2nd, 3rd, 4th values in the vector), or do you mean that when you have plotted them, they are physically near each other (i.e. "nearest neighbors")?
Emiliano Ascenzi
Emiliano Ascenzi 2020년 1월 30일
Sorry, i didn't specified, points are physically near each others

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

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by