How do I extract data point from a cell inside a heatmap?
조회 수: 8 (최근 30일)
이전 댓글 표시
I created a heatmap using the "heatmap" function by feeding a 2-dim matrix. I see I can click into each heatmap cell and show the x name, y name and the value. I am just wondering how I can click into the cell and extract these information (e.g. store them into a variable and use them for other calculations?)
댓글 수: 0
답변 (1개)
Cris LaPierre
2025년 1월 24일
I'm sure there's a way to develop something that does this graphically, but I would use groupsummary to create the heatmap results.
load patients
tbl = table(LastName,Age,Gender,SelfAssessedHealthStatus,...
Smoker,Weight,Location);
heatmap(tbl,'Smoker','SelfAssessedHealthStatus')
heatTbl = groupsummary(tbl,{'Smoker','SelfAssessedHealthStatus'})
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!