How to add text descriptions to data points ?

4 views (last 30 days)
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
Mai Le Thai
Mai Le Thai on 28 Jan 2019
Edited: Mai Le Thai on 28 Jan 2019
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
Alexander Kagermanov
Alexander Kagermanov on 15 Aug 2021
Is there any way to combine text objects into one single object, so that it doesn't slow down zooming in/out?
Jan
Jan on 17 Aug 2021
@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

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!