The anisotropy of physical properties is a well-known characteristic of many clay-bearing rocks. This anisotropy has important implications for elastic properties of rocks and must be considered in seismic modeling. Preferred orientation of clay minerals is an important factor causing anisotropy in clay-bearing rocks such as shales and mudstones that are the main cap rocks of oil reservoirs. The preferred orientation of clays depends mostly on the amount of clays and the degree of compaction. To study the effect of these parameters, we prepared several samples compressing (at two effective vertical stresses) a mixture of clays (illite and kaolinite) and quartz (silt) with different clay/quartz ratios. The preferred orientation of the phases was quantified with Rietveld analysis on synchrotron hard X-ray images. Pole figures for kaolinite and illite display a preferred orientationof clay platelets perpendicular to the compaction direction, increasing in strength with clay content and compaction pressure. Quartz particles have a random orientation distribution. Aggregate elastic properties can be estimated by averaging the single-crystal properties over the orientation distribution obtained from the diffraction data analysis. Calculated P-wave velocity anisotropy ranges from 0% (pure quartz sample) to 44% (pure clay sample, highly compacted), but calculated velocities are much higher than measured velocities. This is attributed to uncertainties about single-crystal elastic properties and oriented micropores and limited grain contacts that are not accounted for in the model. In this work, we present an effective method to obtain quantitative data, helping to evaluate the role of clay percentage and compaction pressure on the anisotropy of elastic properties of clay-bearing rocks.