How to find colorbar object in UI figure?

10 visualizaciones (últimos 30 días)
Ivan Qin
Ivan Qin el 8 de Mayo de 2019
Respondida: Ivan Qin el 8 de Mayo de 2019
In an app UI there are several axes each has an coloarbar with a coloarbar label string. I tried to use findobj and findall to find the handel of the colorbar or the label string and that returns empty array.
I tried these:
findobj(UIAxes.Parent, '-depth', inf, 'Type', 'Colorbar');
findall(UIAxes.Parent, '-depth', inf, 'Type', 'Colorbar');
findobj(UIAxes, 'Type', 'Colorbar');
findall(UIAxes, 'Type', 'Colorbar');
more background: I want to save the figures generated in the app and am doing something similar to the code here https://www.mathworks.com/matlabcentral/answers/281318-how-can-i-save-a-figure-within-app-designer, but just could not find the handel to the color bar.
any idea? thanks!
  1 comentario
Rik
Rik el 8 de Mayo de 2019
Why aren't you storing the handle on creation?

Iniciar sesión para comentar.

Respuestas (1)

Ivan Qin
Ivan Qin el 8 de Mayo de 2019
I did (actually store the label string directly and pass that as input argument), but am curious if there is a way I don't have to do that.

Categorías

Más información sobre Develop uifigure-Based Apps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by