how create graph in uitable in the app designer (using code)
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
hi,
i've this data:
app.GridLayout
app.TabGroupQ1
can i create graph (as pics) using code?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1521401/image.png)
0 commentaires
Réponse acceptée
Voss
le 25 Oct 2023
You want to create an empty axes (with an xlabel, ylabel, and title) inside a specified tab?
ax = axes(tab); % tab is the tab you want the axes to be created in
xlabel(ax,'X')
ylabel(ax,'Y')
title(ax,'Title')
3 commentaires
Voss
le 26 Oct 2023
Modifié(e) : Voss
le 26 Oct 2023
axes Units are 'normalized' by default. If you want to use pixel units, set the axes Units to 'pixels' before setting the Position, e.g., when the axes is created:
ax = axes(tab,'Units','pixels'); % tab is the tab you want the axes to be created in
ax.Position = [11 11 1513 832];
Of course you could set both the Units and Position when the axes is created (Units first still)
ax = axes(tab, ...
'Units','pixels', ...
'Position',[11 11 1513 832]);
Another option is to use a uiaxes instead of an axes. uiaxes' default Units is 'pixels'.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!