Modify axtoolbar in App designer

9 次查看(过去 30 天)
Mirko Maurici
Mirko Maurici 2019-5-16
回答: Aniket about 8 hours 前
Hello,
I'm using app designer and I'm trying to modify the tools in the axtoolbar without succes. More specific I'm trying to add the data cursor tool to the tools that are created automatically.
The command
tb1 = axtoolbar(app.Axes,{'export','datacursor','pan','zoomin','zoomout','restoreview'});
didn't work.
Maybe the datacursor is not yet implemented in appdesigner.
If I try to modify the tools and set less of them it works.
tb1 = axtoolbar(app.Axes,{'restoreview'});
Any solution?
Thank you
  6 个评论
Ajeya Gupta
Ajeya Gupta 2020-10-12
Hi guys,
Did anyone get arrive at solution to this? I am looking to modify the appearance of Axes toolbar on Matlab's Appdesigner. I am currently using Matlab 2020a version.
Thanks
Ajeya
Thomas Nevalainen
Thomas Nevalainen 2021-10-14
Hello friends,
Checking up on the status a year after Ajeya's comment, any progress on the issue yet? Can we get the devs involved to get word if the issue is being worked on?
Specifically, I'm trying to implement both 'brush' and 'datacursor' in a UIfigure using R2020b without any success with 'datacursor'.
Cheers!
Thomas

请先登录,再进行评论。

回答(1 个)

Aniket
Aniket about 5 hours 前
As of R2023a, 'datacursor' mode can be used for apps created in App Designer and using the "uifgure" function.
As a workaround for versions prior to R2023a, you can make your own custom data tip button as follows:
axtoolbarbtn(tb,"state","Icon","datacursor","Tooltip","Data Tips",...
"ValueChangedFcn",@(e,d)datacursormode(ancestor(d.Source,'figure'),d.Value))
Please refer to the following R2023a release notes of “App Building”:
I hope this helps you achieve the functionality you want to implement.

类别

Help CenterFile Exchange 中查找有关 App Building 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by