Abstract A probe laser beam can be completely absorbed in an atomic resonance frequency region, however, if a coupling laser beam is further applied to the atom, the atomic medium can exhibit electromagnetically induced transparency (EIT), i.e, the probe beam can be completely transmitted through the atomic medium. Thus, if the coupling beam is a standing wave field with nodes and antinodes, it will cause in space a periodic modulation of the transmitted spectrum of the probe field. This means that the probe field propagates through the atomic medium just as it passes through a diffraction grating which is called electromagnetically induced grating (EIG). Based on amplitude or phase modulation of transmission function, the absorption grating or the phase grating can be formed, respectively. In this work, based on controllable absorption and dispersion properties of a three-level V-type atomic system, we study the control of the absorption grating and the phase grating with respect to the intensity and the frequency of the laser fields. The absorption diffraction pattern at the two-photon resonance is obtained, while the phase diffraction pattern appears when there is a frequency shift of either the coupling frequency or the probe frequency compared to the corresponding atomic resonance frequency. By adjusting the coupling or/and probe laser frequency, the absorption grating can be converted into the phase grating and the high-order diffraction efficiency can also be improved.