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 commentaires

Fangjun Jiang
Fangjun Jiang le 28 Jan 2019
what do you really want?
Mai Le Thai
Mai Le Thai le 28 Jan 2019
Modifié(e) : Mai Le Thai le 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?

Connectez-vous pour commenter.

 Réponse acceptée

Jan
Jan le 28 Jan 2019
Modifié(e) : Jan le 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 commentaires

Mai Le Thai
Mai Le Thai le 28 Jan 2019
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?
Jan
Jan le 17 Août 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Produits

Version

R2018b

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by