Well use your best judgement.. I usually step 6 for walk and trot.. in a straight line. You can place the cones diagonally too to get more space or serpentine around them.
I haven't ever cantered around cones but I'd do at least 12 steps apart especially if my horse is feeling unbalanced and keep the number of cones to a minimum.
If you are training for gymkhana, then place them appropriately and build up to speed and shortened distance over a long span of time because it is hard on your horse if you just make them start "weaving" tightly.
A fun exercise I like to do with a cone, though is to place it in the middle of the arena, and make the largest circle around it (the span of the arena, and then very slowly shorten my circle until I end with a pretty small circle (3 ft diameter) and then get bigger. You can put cones in a row going out to help you stay in the circle.
Start at the walk, do the entire thing inwards (towards the middle cone) and outwards (away from the middle cone), then at the trot, the entire thing, then the canter.. but I wouldn't go smaller at the canter than lane 5 (in the picture) but remember to wind back up to lane 1
Repeat both sides! It's a good workout :)