Assuming you're using the X-Y graph (the word "multiplot" means little to
me) then each dataset is a cluster of the X array and Y array for that
dataset. To put several datasets on the graph you make an array of these
clusters. This should be very clear in the context help for the X-Y plot
terminal.
To add spectra you simply append it to the array of spectra already in the
plot. The brute force and simplest to understand approach would be to use a
local to retrieve all the data that's currently in the plot as an array,
append the new plot to the end and write it all back to the plot, either to
its terminal or via another local. More elegant would be to buffer your
array of plots internally within the program and have an array of Booleans
allowing you to selectiv
ely show/hide plots, either by omitting datasets
when writing them to the graph or, to maintain consistency in plot styles,
writing an empty element to the array in place of hidden datasets, but if
this is meaningless to you then the first suggestion is perfectly adequate.
jeffrz wrote in message
news:101-50650000000800000050150000-982303670000@quiq.com...
> I would like to be able to overlay sets of spectra to compare
> intensity variations. I am familiar with the multiplot usage, but my
> question involves how to allow a variable number of data sets to be
> overlayed. I have a vi that plots a spectrum after the user presses a
> "load file" button. I would like to add a boolean that when true would
> continue to stack spectra on the existing plot, and when false would
> just plot an individual spectrum each time. How can I accomodate a
> variable number of data sets in the multiplot?