Marking highlighted data points with text on a scatter plot
显示 更早的评论
After highlighting data points on a scatter plot, how do I apply the text function to include the x values over the points?
scatter(range,ratsmask,'fill','red')
range is the domain of values, and ratsmask is a logical mask identifying which of those values meets a specific condition. The plot is done, but how do I display the x index as text above the point.
text(range,ratsmask,'????')

Any help is appreciated!
回答(1 个)
Steven Lord
2018-4-8
0 个投票
Use the text function.
1 个评论
Steven Lord
2018-4-8
The num2str or sprintf functions may be of use.
类别
在 帮助中心 和 File Exchange 中查找有关 Scatter Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!