The anisotropy in the angular distribution of the fusion-fission and quasifission fragments for the $^{16}$O+$^{238}$U, $^{19}$F+$^{208}$Pb and $^{32}$S+$^{208}$Pb reactions is studied by analyzing the angular momentum distributions of the dinuclear system and compound nucleus which are formed after capture and complete fusion, respectively. The orientation angles of axial symmetry axes of colliding nuclei to the beam direction are taken into account for the calculation of the variance of the projection of the total spin onto the fission axis. It is shown that the deviation of the experimental angular anisotropy from the statistical model picture is connected with the contribution of the quasifission fragments which is dominant in the $^{32}$S+$^{208}$Pb reaction. Enhancement of anisotropy at low energies in the $^{16}$O+$^{238}$U reaction is connected with quasifission of the dinuclear system having low temperature and effective moment of inertia.