Declaration: Frm2DImg.DisplaySpectrum(PosX, PosY, TimeSlot, SpecGroup: integer; llx, lly, urx, ury: double; GridOn, DataPointsOn: boolean; Caption: string): integer;
DisplaySpectrum displays the spectrum at the position [PosX,PosY] (in pixels) at a point in time specified by the parameter TimeSlot. The parameter SpecGroup controls the spectral group which is to be displayed. The parameters llx (lower left x), lly (lower left y), urx (upper right x) and ury (upper right y) determine the range of the spectral chart (in spectral/intensity coordinates). Setting all four of these parameters to zero values forces the function to autoscale the spectral graph. Setting either llx and urx, or lly and ury to zero values triggers an autoscaling of the corresponding axis only.

Finally the parameters GridOn and DataPointsOn control whether a grid is displayed and whether the individual data points should be indicated by small dots. The parameter Caption specifies an optional caption which is displayed at the top right of the spectrum. Setting Caption to an empty string will trigger the default caption.

The function returns the following error codes:

 0 ... everything is OK
-1 ... the image coordinates PosX/PosY are out of range
-2 ... the time slot is out of range
-3 ... the spectral group does not exist

Last Update: 2020-Mar-05