Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Graphics Performance

Optimize code for improved performance

Functions

drawnowUpdate figures and process callbacks
openglControl OpenGL rendering

Topics

Finding Code Bottlenecks

Use the code profiler to determine which functions contribute the most time to execution time.

What Affects Code Execution Speed

You can improve the execution speed of graphics code by minimizing the effect of two factors that contribute to total execution time.

Judicious Object Creation

Graphics objects are complex structures that store information, listen for certain events to occur, and can cause changes to other objects to accommodate their existence.

Avoid Repeated Searches for Objects

When you search for handles, MATLAB® must search the object hierarchy to find matching handles, which is time-consuming.

Screen Updates

MATLAB graphics is implemented using multiple threads of execution.

Getting and Setting Properties

Certain properties have dependencies on the value of other properties.

Avoid Updating Static Data

If only a small portion of the data defining a graphics scene changes with each update of the screen, you can improve performance by updating only the data that changes.

Use Low-Level Functions for Speed

To maximize graphing performance, use low-level functions and disable certain automatic features.

Transforming Objects Efficiently

Improve performance by taking advantage of the fact that graphics hardware can apply transforms to the data.

System Requirements for Graphics

All systems support most of the common MATLAB graphics features.

Resolving Low-Level Graphics Issues

MATLAB can encounter low-level issues when creating graphics on your system.

Was this topic helpful?