Is there a better way to initialize the DataTipTemplate field in primitive objects?
古いコメントを表示
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...
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Graphics Object Properties についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


