Plots in app designer

1 visualización (últimos 30 días)
Asad Elmgerbi
Asad Elmgerbi el 17 de Mayo de 2020
Comentada: Asad Elmgerbi el 18 de Mayo de 2020
Dears ,
Have question regrading ploting in app designer ,
I have the following code for ploting a figure
figure(1);
barh(predictorImportance)
grid on
set(gca,'ytickLabel',inputNames(sortedIndex))
xlabel({'Predictor Importance for ', convertCharsToStrings(outputNames) })
........................................
How can do code change so that it fit to app. uiaxes , in other words , how I can use app. uiaxes to make the same plot .

Respuesta aceptada

Mohammad Sami
Mohammad Sami el 18 de Mayo de 2020
You can specify the handle of the uiaxes, so that matlab knows which axes to plot on.
barh(app.UIAxes,predictorImportance);
grid(app.UIAxes,'on');
set(app.UIAxes,'ytickLabel',inputNames(sortedIndex));
xlabel(app.UIAxes,{'Predictor Importance for ', convertCharsToStrings(outputNames) });
  1 comentario
Asad Elmgerbi
Asad Elmgerbi el 18 de Mayo de 2020
Thanks Mohammad .
It works

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer 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