There are a few things to remember if you want to attract butterflies to your gardens. You must think about the entire lifecycle of the butterfly, instead of simply planting nectar plants. You want them to be able to meet all their needs in your yard so that they stay nearby. To do this, you must provide them with caterpillar host plants, food sources, protection, and sunshine and warmth, and nutrients.
Caterpillar host plants
These are those plants that a butterfly will select to lay eggs on, and where the baby caterpillars will eat. They are often quite specific to the butterfly. Milkweed for monarchs, spicebush for swallowtails, joe-pye weed for the fritillary. A good source for more information on host plants here.
Food sources for adult butterflies include flower nectar, sap, and rotting fruit. Butterflies are nearsighted, so larger groupings of flowers are best to attract their attention. Flowers with "landing pads", like coneflowers, will provide them with a large spot to land and settle in for a drink.
Butterflies require nutrients that nectar can't provide. Sand and mud are good sources, so a dish with either of these, wetted and placed in the garden will help.
Trees and shrubs, a woodpile, and even piles of rocks can provide protection from preditors and the elements.
Sunshine and Warmth
You won't see many butterflies early in the morning, because they need sunshine and warmth to get going. When the temperature is below 55-60 degrees, fluid in their wings thicken and they can't fly. Provide some large stones in your butterfly garden so they can absorb those warming rays!