Ideally, you should try to give each plant as much room as you can. Roots should have at least a foot, preferably more, of soil depth. Plants should also be spaced a minimum of a foot apart for best results, and to prevent their root systems from intertwining. You don't want them to have to compete too hard for nutrients, so planting them too close will likely cause underdeveloped plants. But if you're working in a small area, then so be it. You just have to work with what you have.