For data storage, at the top most level there are the IPlotDataSets which are declared in globals.h in the following way.
The macro, MAX_NUM_DATA_SETS, is defined in plot.h There is also a pointer to a single data set which will also be set to the current working data set from the list of data sets above.
As the user adds a new data set, a global variable noof_data_sets (defined in globals.h ) is incremented and the new information occupies the next spot in the IPlotDataSets array. For convenience, the noof_data_sets variable is linked to the TCL variable ipl_noofdatasets. (More about Variable Linking) Ideally, what is needed is a way to delete data sets and then add new ones in the first available spot, instead of after the last spot.
Data sets aren't removable at present as this was not a priority feature. Ideally, what is needed is a way to delete data sets and then add new ones in the first available spot, instead of after the last spot.