Companion planting is an ancient agricultural technique that in recent years is getting some scientific attention. The idea behind companion planting is to grow plants together that benefit from their association with each other. In some cases, one plant provides nutrients or shade to a companion plant, while in other cases an herb or vegetable prevents a certain type of pest from eating a companion plant. For a container garden, companion planting is very sensible because you can make the most of your limited soil and potting space, and encourage healthy plant growth with natural techniques.
Mix a few flowers in or near your vegetable container garden. Zinnia, marigold and calendula all attract beneficial insects like bees and butterflies. Marigold has the added benefit of repelling unwanted insects like aphids and flies.
Spread a few beneficial herbs around the garden. Sweet basil helps deter aphids and mites, borage attracts beneficial insects and repels tomato worms, and wormwood helps keep animals away.
Plant vegetables from the cabbage family together with herbs. Vegetables in the cabbage family also include broccoli, cauliflower, kale and turnips. Herbs like thyme, mint, dill, sage and chamomile all help ward off the cabbage worms that feast on the vegetables. Avoid planting cabbage family vegetables with other heavy feeders like tomatoes, squashes and eggplants.
Feed your tomatoes with legumes. Legumes, such as beans and peas, are nitrogen fixers, which mean they break down nitrogen into a form that can be easily digested by other plants. Tomatoes, squash and eggplant benefit from being in the same pot with legumes.
Trellis your beans and peas with corn. If you plant your corn early enough for it to get a good start, the legumes will wrap themselves around the corn stalks while the corn provides them with a little shade. The legumes will also provide the corn with nitrogen.
Grow some onions alongside beets, tomatoes or lettuce. Onion helps keep slugs off these slow-growing plants.
Mix garlic plants into your herbs. Garlic gives off a chemical that enhances oil production in the herb plants, which improves their flavor by making them more pungent.
Keep your eggplants near the potatoes. Eggplants attract potato beetles and keep them off the potatoes. The beetles can't really harm the eggplants. This type of companion planting is called an insect trap.
Avoid putting plants together that don't get along with each other. Some plant groupings like tomatoes with eggplant or peppers put the plants in competition with each other for the same nutrients. Carrots and dill grow poorly together, as do legumes with onions.