  We report a comprehensive Cu L$_3$-edge resonant x-ray scattering study of
two- and three-dimensional (2D and 3D) incommensurate charge correlations in
single crystals of the underdoped high-temperature superconductor
YBa$_2$Cu$_3$O$_{6.67}$ under uniaxial compression up to 1% along the two
inequivalent Cu-O-Cu bond directions (a and b) in the CuO$_2$ planes. The
pressure response of the 2D charge correlations is symmetric: pressure along a
enhances correlations along b, and vice versa. Our results imply that the
underlying order parameter is uniaxial. In contrast, 3D long-range charge order
is only observed along b in response to compression along a. Spectroscopic
resonant x-ray scattering measurements show that the 3D charge order resides
exclusively in the CuO$_2$ planes and may thus be generic to the cuprates. We
discuss implications of these results for models of electronic nematicity and
for the interplay between charge order and superconductivity.
