Extensive small angle neutron scattering experiments have been conduct
ed on the vortex system in YBa2Cu3O7 in a magnetic field range of 0.5
T less than or equal to H less than or equal to 5 T, and with various
orientations of the magnetic field with respect to the crystallographi
c axes. For H parallel to the c axis, the vortex lattice is oblique wi
th two nearly equal lattice constants and an angle of 73 degrees betwe
en primitive vectors. One principal axis of the vortex lattice coincid
es with the (110) direction of the crystal lattice. It is shown that t
his structure cannot be explained in the framework of a purely electro
dynamic (London) model, and that it is intimately related to the in-pl
ane anisotropy of the superconducting coherence length. When the field
is inclined with respect to the c axis, the uniaxial anisotropy due t
o the layered crystal structure of YBa2Cu3O7 becomes relevant. The int
erplay between the square in-plane anisotropy and the uniaxial anisotr
opy leads to both a continous structural transition and a reorientatio
n of the vortex lattice as a function of inclination angle. For the la
rgest inclination angles, the vortex lattice decomposes into independe
nt chains.