Add data class as additional information on 2D plot

Hi,
I have a data vector of N data points and another data vector of the same length. I'm drawing the plot of the first vector and adding vertical lines on some points, but I also want to add class labels from the second vector to each (or some) points of the first vector somehow.
The second vector contains just numerical labels from 1 to 3.
Currently, plot is called like that:
plot(ste_vec);
xline(border_frames, LineWidth=1, Color='red');
The second vector is
classification
Plot looks like that:
What I want to achieve in any way possible:
I've stumbled upon datatip function but it doesn't work with my type of plot.

 채택된 답변

Dyuman Joshi
Dyuman Joshi 2023년 3월 20일
이동: Matt J 2023년 3월 20일

1 개 추천

text might be helpful

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

릴리스

R2022b

질문:

2023년 3월 20일

이동:

2023년 3월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by