register function

Register a function that returns a ggplot object This is usually implemented by ggplot extensions.