Is there a better way to initialize the DataTipTemplate field in primitive objects?
Afficher commentaires plus anciens
Problem:
Creating a Chart Object as in Plot() initializes a DataTipTemplate field in the resulting handle.
p = plot(0,0);
p.DataTipTemplate % Does not return error
But creating the primitive handle directly does not, resulting in an error
q = line(0,0);
q.DataTipTemplate % Returns: "Unrecognized...'DataTipTemplate' for '...primitive.Line'"
mytip = datatip(q,1,1);
q.DataTipTemplate % Now is valid.
But this requires creating and deleting the datatip, which seems sub-optimal.
Ask:
Is there a better way to initialize the DataTipTemplate in primitive objects?
Context:
I'm trying to customize the datatip on a trisurf() plot, which returns a primitive "patch" handle with the same problem. Apparently trisurf() does not have the same initialization as something like plot() or scatter(). I'm also curious why this is...
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Graphics Object Properties dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


