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 is known for its graphing libraries, but it's also a broader ecosystem for building interactive data apps, AI data analysis tools, and deploying and hosting Dash apps. Explore the full set of tools and platforms designed to help turn data into action. Discover Plotly.
Note: We are retiring documentation for R, MATLAB, Julia, and F#. 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'));
