Constructing illustrations by computer can be both tedious and difficult. This thesis introduces five example-based techniques to facilitate the process. These techniques are independently useful, but also interrelate in interesting ways: (1) Graphical Search and Replace, the analogue to textual search and replace in text editors, is useful for making repetitive changes throughout graphical documents. (2) Constraint-Based Search and Replace, an extension to graphical search and replace, allows users to define their own illustration beautification rules and constraint inferencing rules by demonstration. (3) Constraint Inferencing from Multiple Snapshots facilitates constraint specification by automatically computing constraints that hold in multiple configurations of an illustration. (4) Editable Graphical Histories, a visual representation of commands in a graphical user interface, are useful for reviewing, undoing, and redoing sets of operations. (5) Graphical Macros By Example, based on this history representation, allow users to scroll through previously executed commands and encapsulate useful sequences into macros. These macros can be generalized into procedures, with arguments and flow of control using graphical and constraint-based search and replace.