Add additional information to scatter plot points

I have a table of data I want to plot into a scatter plot. The table has a number of qualities that are associated with each point.
The table is roughly 1600x6 as such:
[ Cost | Time | Iteration | ValueA | ValueB | ValueC ]
I want to graph it as a scatter plot of Cost vs. Time which is obviously easy enough, but I want to make it so that when I mouse over a data point on the figure it shows me the other 4 pieces of information. I found that what shows when mousing over a point can be changed with datacursormode and using the displayInformation function, but I can't find a way to associate the data in the table with the appropriate point within the figure. I was wondering if there was some easyish way to associate that data correctly so that I may show all the necessary information in the mouseover data cursor?

답변 (1개)

Sam
Sam 2021년 7월 6일

0 개 추천

You can use datatips for doing this. Read more about datatips here.

댓글 수: 1

You can also have a look at DataTipTemplate and DataTipRows. Here's a great post i found that uses them for an application similar to yours. Read more here

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

카테고리

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

제품

릴리스

R2021a

질문:

2021년 7월 6일

댓글:

Sam
2021년 7월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by