Generally if you keep in mind a few general principles on flower shape, color, and fragrance, butterflies will come to your yard. Because butterflies have a mouth similar to a drinking straw, they prefer easy access to nectar. They do not hover, so they also need a landing area on a plant with sturdy stems. The flat center disc, with or without interior petals, is a perfect landing platform and dining area. Members of the Composite or aster family are ideal.
Examples are coneflowers, zinnias, marigolds, cosmos, black-eyed susans, and asters.
Other good plants have clusters of small flowers, like butterfly weed, butterfly bush, alyssum, mints, verbena, and phlox. Most butterflies favor pink, lavender or purple blossoms, but some may visit other colors. For instance, swallowtails like reds and have been seen on yellow lantana. Butterflies have a well developed sense of smell and are attracted to heavily perfumed flowers. They will pass over lightly scented varieties in favor of the most fragrant.