How can I customly fix the Data cursor location in the Matlab plot?
28 次查看(过去 30 天)
显示 更早的评论
Jaikrishnan Mahalekshmi Sahasranamam
2019-7-17
评论: Jaikrishnan Mahalekshmi Sahasranamam
2019-8-5
I have a plot (attached). In this plot I need to add two data cursors. In one of the data cursor, I need to fix the X value to be 0 and in the other i need to fix the y value to 0. How can I adjust the data cursor points to do so? currently in the first data tip, the Y value is -49.51 and in the other data tip the x value is 0.485. I need to make it in such a way as to keep Y value 0 in first and X value 0 in second. By doing this I will get the corresponding X value from 1st and corresponding Y value from 2nd
2 个评论
采纳的回答
Dinesh Yadav
2019-8-2
I am assuming you have the equation used for plotting. You can feed the value “x=0” in the function to get the value of “y” and vice versa and store these values in variable “pos1” and “pos2”. Without having the values for both “x” and “y” you cannot obtain the DataCursor on the plot.
I am attaching a slightly modified code for your given code with which you can obtain DataCursor at any point of your choice. I have commented few lines that are not needed and changed few lines of code for updating DataCursors.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Title 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!