In X-ray differential phase-contrast imaging. In order to enhance the information acquired by phase-contrast imaging, an analyzer grating (34) is provided with an absorption structure (48). The latter includes a first plurality (50) of first areas (52) with a first X-ray attenuation, and a second plurality (54) of second areas (56) with a second X-ray attenuation. The second X-ray attenuation is smaller than the first X-ray attenuation, and the first and second areas are arranged periodically in an alternating manner. A third plurality (58) of third areas (60) is provided with a third X-ray attenuation, which lies in a range from the second X-ray attenuation to the first X-ray attenuation, wherein every second of the first or second areas is replaced by one of the third areas.