A method for precisely measuring and displaying the whole profile of an X-ray spectral waveform, which rises from a background level and finally returns to the background level after passing across a peak. X-rays are counted for a time interval of to at a spectral position, resulting in X-ray N counts not containing statistical fluctuations. A standard deviation Eo representing a variation accompanying the N counts is given by Sqrt(N). Where the variation is greater than a given magnitude (tolerance error Er for display) at a spectral position where the X-ray intensity is high, X-rays are counted for a time interval of tm longer than the time interval to, producing increased counts Nm.