I have a function that plots a graph, how do I tell it which app.UIAxes to plot it on in AppDesigner?

1 vue (au cours des 30 derniers jours)
As per title...
I have a function that plots a graph based on a series of variables it is fed.
I don't want to hard code in the axes in which to plot it on.
Is there a way to feed the function the app.UIAxes function name?
  2 commentaires
Suraj Sudheer Menon
Suraj Sudheer Menon le 22 Juin 2020
@AThomas
Is your app display having multiple axes? The name for each UI axes is visible in the component browser of the App Designer. The callback function which is plotting the graph could specify the axes in which you would like to plot using a switch case.
Walter Roberson
Walter Roberson le 22 Juin 2020
Any reason not to just add a parameter that is the axes handle?

Connectez-vous pour commenter.

Réponses (1)

Raunak Gupta
Raunak Gupta le 24 Juin 2020
Hi,
If the plotting function is common for multiple UI Axes then, adding the parameter in plotting function which takes Axes as arguments would be helpful.
If the plotting function is different for every UI Axes than directly including it into the code (hard coding as mentioned in the question) make sense because additional parameter for axes will not add any value.

Catégories

En savoir plus sur Specifying Target for Graphics Output 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!

Translated by