How can I interactively add info to plots, e.g. name of a curve?

2 ビュー (過去 30 日間)
Eva
Eva 2019 年 3 月 22 日
コメント済み: KSSV 2019 年 3 月 22 日
Hi,
I have a huge data set of impedance curves. I would like to be able to click on one line in a gui plot and get the corresponding information to that line.How would I do that?
Thanks a lot!
BR E

回答 (1 件)

KSSV
KSSV 2019 年 3 月 22 日
編集済み: KSSV 2019 年 3 月 22 日
x = rand(10,1) ;
y = rand(10,1) ;
plot(x,y,'.r') ;
[px,py] = getpts() ; % double click on a point when prompts
text(px,py,'point') ;
But what you want to do is a bad idea.
  2 件のコメント
Eva
Eva 2019 年 3 月 22 日
That's actually not what I wanted to do, I want to get a Callback with the information to which data set this curve belongs. But I already found a way to do it I guess, let's see if it is working out.
Thanks for your suggestion anyway!
KSSV
KSSV 2019 年 3 月 22 日
If you have .fig file...you can get the data.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by