Spacing for anchors: Usable Length (in inches) / Total Length (in inches) * 12 inches. For my beds, I calculated a spacing of 11.75 inches for my 8 foot board by dividing the Usable Length of 94 inches by the Total Length of 96 inches and multiplying this by 12. My four foot boards require a spacing of 11.56 inches.
For instance some companion plants for your tomatoes are onions, carrots, and parsley while cabbage and cauliflower need to be kept away. Be sure to rotate your vegetables every year, if you planted tomatoes in the green bed last year plant them into the red bed this year.
Then, determine what you would like to use for the anchors. If you built your garden bed out of lumber, you could use nails as anchors, spacing each nail the appropriate distance as determined by the results of the calculation in Step 1 above. If your garden bed is made out of a composite material (part wood waste, part plastic), I recommend using an anchor placed on the outside of the bed. Since my beds are 6 inches high, I used 12 inch metal spikes I bought from the local hardware store, pounding them into the soil directly on the outside of the garden bed.
The 4x8 foot garden beds I bought, for instance, are 4x8 feet from end to end. But when you connect the boards at the corners, you lose a few inches, so the interior dimensions of the garden bed are actually a few inches short of the advertised size. In my case, my beds have an interior dimension of 46.25 inches x 94 inches. I refer to these dimensions as Usable Length for the remainder of this article.