MATLAB: How to programmatically clear subplots in Simulation Data Inspector without clearing all runs out of SDI

simulation data inspectorsimulink

I am looking for a command similar to cla but for SDI. In the GUI, I can click a button labeled "Clear Subplot" and then "Clear all Subplots" but I cannot find how to invoke this same behavior in a script. I am trying to automate the plotting of many data runs, and it takes a long time to reload the runs into SDI from the .mat file if I use Simulink.sdi.clear just to clear the subplots!

Best Answer

Starting R2019b, you can use
Simulink.sdi.clearAllSubPlots
to clear all subplots without removing any runs from SDI.