Adding additional information on plot tooltip

조회 수: 1(최근 30일)
Dharmesh Joshi
Dharmesh Joshi 2022년 6월 21일
댓글: Dharmesh Joshi 2022년 6월 21일
I have a plot , when i hover over the plot line, it displays the value. At the same time i would like to also display the temperture, which is also part of the dataset but not displayed on the plot.
How do i edit the tooltip, so that additional information can be displayed on the tooltip ?


Simon Chan
Simon Chan 2022년 6월 21일
Use function dataTipTextRow
  댓글 수: 3
Dharmesh Joshi
Dharmesh Joshi 2022년 6월 21일
Ok i can get it working if my plot has only one data set e.g.
But i gett the following error message, when a plot has multiple plots
Intermediate dot '.' indexing produced a comma-separated list with 2 values, but it must produce a single value when followed by subsequent indexing
Error in n02 (line 141)
s.DataTipTemplate.DataTipRows(end+1) = row;

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


Community Treasure Hunt

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

Start Hunting!

Translated by