Animals have to coordinate a large number of muscles in different ways to efficiently move at various speeds and in different and complex environments. This coordination is in large part based on central pattern generators (CPGs). These neural networks are capable of producing complex rhythmic patterns when activated and modulated by relatively simple control signals. Although the generation of particular gaits by CPGs has been successfully modeled at many levels of abstraction, the principles underlying the generation and selection of a diversity of patterns of coordination in a single neural network are still not well understood. The present work specifically addresses the flexibility of the spinal locomotor networks in salamanders. We compare an abstract oscillator model and a CPG network composed of integrate-and-fire neurons, according to their ability to account for different axial patterns of coordination, and in particular the transition in gait between swimming and stepping modes. The topology of the network is inspired by models of the lamprey CPG, complemented by additions based on experimental data from isolated spinal cords of salamanders. Oscillatory centers of the limbs are included in a way that preserves the flexibility of the axial network. Similarly to the selection of forward and backward swimming in lamprey models via different excitation to the first axial segment, we can account for the modification of the axial coordination pattern between swimming and forward stepping on land in the salamander model, via different uncoupled frequencies in limb versus axial oscillators (for the same level of excitation). These results transfer partially to a more realistic model based on formal spiking neurons, and we discuss the difference between the abstract oscillator model and the model built with formal spiking neurons.