How to add text descriptions to data points ?

Hi guys, i'm facing a problem, which with the command 'text' is not so ideal. Do you know another alternative command for 'text', that more faster ist? Thanks!

2 Comments

what do you really want?
Hi Jiang,
my problem is:
if have a vector double array a and b and a cell array m with the size (100x1). I want to add each text from cell array m to point(a,b).
I have tried text command: text(a,b,m). it worked but quite slow. I just want to know, if another effective command in this situation exist?

Sign in to comment.

 Accepted Answer

Jan
Jan on 28 Jan 2019
Edited: Jan on 28 Jan 2019
text is powerful and fast, if you call it correctly. It is the best function to insert text in axes objects. You will not find a "faster" or "more ideal" function to do this. So my answer is: No, I do not know an alternative. At least not based on the gived details. Maybe you want to share what you want to achieve, which code you use and which limitations you see. If text works slowly in your code, this can be caused by an inefficient way to use it.
By the way, if there are commands similar to a specific command, they are mentined in the "See also" line at the bottom of the documentation. So see:
doc text
and scroll to the bottom.

3 Comments

Thanks for your answer! I would try to check mein code again. When i have another question, i will ask you guys:))
Is there any way to combine text objects into one single object, so that it doesn't slow down zooming in/out?
@Alexander Kagermanov: It depends. Do the text objects have the same parent? What does "combine" mean? Do you use multiple text() commands to display several lines of text with a fixed vertical spacing?
Please open a new question and mention the details preferrably in a minimal working example.

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2018b

Tags

Asked:

on 28 Jan 2019

Commented:

Jan
on 17 Aug 2021

Community Treasure Hunt

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

Start Hunting!