Documentation

Graphics Performance

Optimize code for improved performance

Functions

drawnow Update figures and process callbacks
rendererinfo 图形渲染器信息
opengl Control 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.

系统需求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.