Changing Data Marker Display Information

Hey guys! I'm trying to analyze a Nyquist diagram curve and when I right click on the curve with the data cursor, an X Y point is returned. I need the data marker to display the information contained in the second image. I feel like there is a setting I need to change; I'm pretty new to Matlab so I apologize if this is a stupid question!

7 Comments

Are you going to edit away this question too once you get your answer?
No. Why would that matter anyways? My other question got 4 views, three of which were from myself. I think I did a service by "deleting" it lol
The view count is "last 30 days".
The volunteer spent time answering you. Is the way you thank the volunteer by removing your question, thus treating the volunteer as an unpaid private consultant without the permission of the volunteer?
I see your point. Although I do have to ask, why were you looking at my old posts anyway? They have little relevace to the question that was asked here.
I had your post on my Watch list, so when you removed the text it showed up in my activity list. I probably reformatted your code when you posted it. There are more volunteers contributing than are obvious.
Having people edit away questions after they get an answer really frustrates a number of the volunteers, and several have asked us to do something about the problem. Some of the volunteers have stopped contributing because they have become so frustrated by it happening.
Wow I was not aware this was a rampant issue. Sorry to be apart of the problem. I won't be deleting any more posts.

Sign in to comment.

 Accepted Answer

I haven't worked with diagrams like this, I think if you use nyquist, you might get a datatip that looks like on the second picture. https://www.mathworks.com/help/ident/ref/nyquist.html
Otherwise, take a look here and here.

8 Comments

I have tried that and unforutantely that didn't seem to work either. Thanks for the suggestion though!
It works.
H = tf([2 5 1],[1 2 3]);
nyquist(H)
If you run this, and use the Data Tip tool, you'll get the data tip from the second image.
If you want to set it programmatically, it's a bit of a hassle but this works
h = findall(0, 'type', 'hggroup');
h_line = findobj(h, 'type', 'line'); % this returns two objects
datatip(h_line(1), 2.2, 2.6);
I wouldn't know why there are two line objects, but this generates a proper tip.
As I see from your code, you're assigning only a Line object to your axes, it does not contain all the data about diagram.
I consider this as a solved question, however, I'll politely ask you not to edit away the question like you did with the previous one. It took me 15 minutes to help you, other users who may encounter the same issue will not have to ask the same question, unless they don't know what the question was.
Ri Eld
Ri Eld on 1 Nov 2020
Edited: Ri Eld on 1 Nov 2020
Thank you for taking the time to reply to my quesition. Unfortunately, the data tip is still only displaying X Y coordinates. Maybe I'm missing a tool box? I do have Control System Designer, Control System Tuner, and PID tuner installed, though.
Don't worry, I won't be "deleting" this post. The other quesiton I asked was related to a homework assignment for an obscure class that no one else would have benifited from. I had made an error with some hand claculations which led me to believe I had input something wrong into Matlab.
If this is the livescript, try it in the regular one. Also, you see, imaginary value is not equal to what you're looking for.
datatip(h_line(2), 2.2, 2.6); % It looks like that the plot object consists of two line objects
Thank you so much! Running it in Live Script was the issue. I really appreciate the help!
Could you please accept this as an answer. Thanks in advance.
Yes this has been answered. Thank you.
There's a button next to my name which states "Accept this answer", this is to set the status of the question whether it's answered or not.

Sign in to comment.

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!