Creazione, eliminazione ed esecuzione di query sugli oggetti dei grafici
Trovare, copiare ed eliminare oggetti dei grafici
Utilizzare le funzioni per creare, eliminare e copiare oggetti dei grafici, preparare figure e assi per il plottaggio e verificare la validità degli oggetti dei grafici. Esplorare il sistema grafico e rendere il codice più robusto. Ad esempio, è possibile verificare se un oggetto è un oggetto valido dei grafici prima di passarlo a una funzione.
Funzioni
Argomenti
Definizione degli assi e delle figure di destinazione
- Responding to Hold State
This example shows how to test for the hold state and respond appropriately in user-defined plotting functions. - Use newplot to Control Plotting
This example shows how to prepare figures and axes for user-written plotting functions. - Control Graph Display
You can control which figures and which axes MATLAB® uses to display the result of plotting functions. - Prepare Figures and Axes for Graphs
MATLAB plotting functions rely on the values of the figure and axesNextPlotproperties to determine whether to add, clear, or clear and reset the figure and axes before drawing the new graph. - Prevent Access to Figures and Axes
In some situations it is important to prevent particular figures or axes from becoming the target for graphics output.
Creazione di oggetti
- Graphics Object Handles
Use the object handle to set and query the values of the object properties. - Graphics Arrays
Graphics arrays can contain the handles of any graphics objects. - Preallocate Arrays of Graphics Objects
Use thegobjectsfunction to preallocate arrays for graphics objects.
Identificazione, copia ed eliminazione di oggetti
- Find Objects
Thefindobjfunction can scan the object hierarchy to obtain the handles of objects that have specific property values. - Delete Graphics Objects
Remove graphics objects with thedeletefunction. - Special Object Identifiers
MATLAB provides functions that return important object handles so that you can obtain these handles whenever you require them. - Test for Valid Handle
Useisgraphicsto determine if a variable is a valid graphics object handle. - Handles in Logical Expressions
Handle objects do not evaluate to logicaltrueorfalse. You must use the function that tests for the state of interest and returns a logical value.