Cr(001)/CoCrPt (112̄0) films, used in magnetic hard disks, exhibit in-plane magnetic anisotropy when grown over a substrate patterned with shallow grooves. In this experiment, Cr/CoCrPt films are grown over substrates that have been patterned using lithographic techniques to produce well-controlled topography. The in-plane anisotropy, which is of the order of 104 J m−3, increases with the groove height and frequency. This magnetic anisotropy is a result of anisotropic in-plane crystallographic orientation and anisotropic stress. Stress-induced anisotropy accounts for up to 25% of the total in-plane anisotropy, but the major contribution to the anisotropy is a preferential Co c-axis alignment parallel to the groove direction.