This chapter looks in depth at the task of writing graphical functions for others to use.
There are important guidelines for writing simple functions whose main purpose is to produce graphical output. There is an emphasis on making sure that other users can annotate the output produced by a function and that other users can make use of the function as a component in larger or more complex plots.
There is also a discussion on how to create a new class of graphical object. This is important for allowing users to interactively edit output, to ask questions such as how much space a graphical object requires, and to be able to combine graphical objects together in a gTree.