We study the effect of shear on the coherent structures near the hot surface, namely, line plumes, in turbulent Rayleigh-Bénard convection (RBC) and turbulent mixed convection (MC) for the range of near-surface Rayleigh numbers 5.75×107≤Raw≤2.17×109 and shear Reynolds numbers 8.02×102≤Re≤15×103 for a Prandtl number range of 10.1≥Pr≥0.7 in water and air. Plumes are visualized by particle scattering in MC in air while they are extracted from the particle image velocimetry fields in RBC in water. We also use the planforms of plume structure obtained by Gilpin et al. [J. Heat Transfer 100, 71 (1978)JHTRAO0022-148110.1115/1.3450506] in MC in water using electrochemical visualization, as well as those obtained by Pirozzoli et al. [J. Fluid Mech. 821, 482 (2017)JFLSA70022-112010.1017/jfm.2017.216] in simulations. The planforms of plume structure show that shear aligns the line plumes and increases their mean spacing λ. An increase in Raw decreases λ, while the resulting increase in Re in RBC, due to the increase of larger large-scale flow strength, counteracts this effect. Further, plumes are seen more spaced and smeared in air, compared to that in water, due to the lower Pr. We show that these complex dependences of λ on Raw, Re, and Pr in RBC and MC can be described by a common scaling law λ∗=λ-λ0=SZsh/D, where λ0 is the mean plume spacing in the absence of shear, S=Re3/Raw is a shear parameter, Zsh=ν/Ush is the viscous-shear length, and D a function of Pr. © 2019 American Physical Society..