Updating Plots, Storing and Clearing Plot Data, and Preview Datasets
Controlling and Checking if Plots Are Updated
To specify if plots selected in the Model Builder only should be updated when the user explicitly requests it, use the following method:
model.result().setOnlyPlotWhenRequested(boolean value);
To check if plots selected in the Model Builder only should be updated when the user explicitly requests it, use the following method, which returns a Boolean value:
model.result().isOnlyPlotWhenRequested();
String and Clearing Plot Data
To avoid recreating plot data in a model, the plot data can be stored in the model for a plot group using the following property:
model.result("pg1").set("savedatainmodel", true);
which saves the plot data in the model for the plot group pg1. It can be useful for data that takes a long time to recompute but is not very large (such as some 1D plots, for example).
model.result().clearStoredPlotData() removes all stored plot data from the model.
Creating a Preview of a Dataset
To create a preview of a dataset represented as a DatasetFeature, use the createPlot method:
DatasetFeature.createPlot()