An analysis device comprising: a spectroscopic element that diffracts a signal generated by a specimen; a detector that detects the signal diffracted by the spectroscopic element; and a spectrum generation unit that generates a spectrum of the signal based on a detection result by the detector, the spectrum being represented by a horizontal axis that expresses an energy of the signal, and a vertical axis that expresses an intensity of the signal, the detector including detection regions arranged in a plurality of rows and a plurality of columns, a divergent direction of the signal incident on the detector being neither parallel nor perpendicular to a column direction of the detector, the divergent direction of the signal and an energy dispersion direction of the signal being orthogonal to each other, and the spectrum generation unit performing: processing for acquiring a plurality of row spectra by generating a row spectrum represented by a horizontal axis that expresses an energy of the signal and a vertical axis that expresses an intensity of the signal for each of the plurality of rows based on a result of detection of the signal in the detection regions arranged in a row direction of the detector; and processing for generating a spectrum of the signal based on the plurality of row spectra having peaks of identical energy values, characterized in that, in the processing for generating the spectrum of the signal: energy axes of the plurality of row spectra are corrected by matching positions of the peaks having identical energy values, and the spectrum of the signal is generated based on the plurality of row spectra having the corrected energy axes. a spectroscopic element that diffracts a signal generated by a specimen; a detector that detects the signal diffracted by the spectroscopic element; and a spectrum generation unit that generates a spectrum of the signal based on a detection result by the detector, the spectrum being represented by a horizontal axis that expresses an energy of the signal, and a vertical axis that expresses an intensity of the signal, the detector including detection regions arranged in a plurality of rows and a plurality of columns, a divergent direction of the signal incident on the detector being neither parallel nor perpendicular to a column direction of the detector, the divergent direction of the signal and an energy dispersion direction of the signal being orthogonal to each other, and the spectrum generation unit performing: processing for acquiring a plurality of row spectra by generating a row spectrum represented by a horizontal axis that expresses an energy of the signal and a vertical axis that expresses an intensity of the signal for each of the plurality of rows based on a result of detection of the signal in the detection regions arranged in a row direction of the detector; and processing for generating a spectrum of the signal based on the plurality of row spectra having peaks of identical energy values, characterized in that, in the processing for generating the spectrum of the signal: energy axes of the plurality of row spectra are corrected by matching positions of the peaks having identical energy values, and the spectrum of the signal is generated based on the plurality of row spectra having the corrected energy axes. processing for acquiring a plurality of row spectra by generating a row spectrum represented by a horizontal axis that expresses an energy of the signal and a vertical axis that expresses an intensity of the signal for each of the plurality of rows based on a result of detection of the signal in the detection regions arranged in a row direction of the detector; and processing for generating a spectrum of the signal based on the plurality of row spectra having peaks of identical energy values, characterized in that, in the processing for generating the spectrum of the signal: energy axes of the plurality of row spectra are corrected by matching positions of the peaks having identical energy values, and the spectrum of the signal is generated based on the plurality of row spectra having the corrected energy axes. energy axes of the plurality of row spectra are corrected by matching positions of the peaks having identical energy values, and the spectrum of the signal is generated based on the plurality of row spectra having the corrected energy axes.