I have a data of time, X, Y and speed. firstly I'm looking for a way to draw a 2D graph with only X and Y with colorbar related to the high number of X and Y and low number of X and Y (i.e. X and Y are coordinates of people therefore the graph should be heat or density). I'm not sure if this can be done with only X and Y, so I think I need to create a function of Z that should calculate the number of people at each location, but since the coordinates are not repititive hence a range of space should be used. I couldn't perform any code that can show me anything close, I wish that someone can help me with this. Note that I have already tried the grouptransform function and found that all my data are unique.

 채택된 답변

Cris LaPierre
Cris LaPierre 2020년 10월 29일
편집: Cris LaPierre 2020년 10월 29일

0 개 추천

Sounds like a tiled histogram might be what you are looking for. If position is lat/lon, maybe a geodensityplot?

댓글 수: 3

Abdulkarim Almukdad
Abdulkarim Almukdad 2020년 10월 29일
Thanks for your time. The histogram gave good results but its problem is the squares unlike surf or pcolor graphs as for the geodensityplot is results in an error (lat to be a vector). I have attached my data, appreciate your time and effort hope you can help fine find a way or a bath to follow as I have no idea what to do.
You can change the bin size in histogram2 using the nbins option, or by adding the BinWidth name-value pair.
histogram2(X,Y,'DisplayStyle','tile','ShowEmptyBins',"on","BinWidth",[20 10])
Abdulkarim Almukdad
Abdulkarim Almukdad 2020년 10월 29일
Thanks a lot

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Orange에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by