®. Examples of overwriting charts with new data, extending traces, and adding new traces.> ®. Examples of overwriting charts with new data, extending traces, and adding new traces./> ®. Examples of overwriting charts with new data, extending traces, and adding new traces./>

Sending Data to Chart Studio Graphs in MATLAB®

How to send data to charts in MATLAB®. Examples of overwriting charts with new data, extending traces, and adding new traces.


Plotly Studio: Transform any dataset into an interactive data application in minutes with AI. Try Plotly Studio now.

Note: We are retiring documentation for R, MATLAB, Julia, and F# in November 2025. Learn more about this change here.

Overwrite chart data with new data

plotly([1, 2], [1, 2], struct('filename', 'name-of-my-plotly-file'));

Add data to an existing trace

plotly([1, 2], [1, 2], struct('filename', 'name-of-my-plotly-file', 'fileopt', 'extend'));

Add new traces to a chart

plotly([1, 2], [1, 2], struct('filename', 'name-of-my-plotly-file', 'fileopt', 'append'));