function factory( options ) {
	var opts;
	if ( arguments.length ) {
		if ( !isObject( options ) ) {
			throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
		}
		opts = copy( options );
	} else {
		opts = {};
	}
	return plot;

	/**
	* Creates a plot.
	*
	* @private
	* @param {Array} [x] - x-values
	* @param {Array} [y] - y-values
	* @throws {TypeError} must provide valid options
	* @returns {Plot} plot instance
	*/
	function plot( x, y ) {
		if ( arguments.length === 2 ) {
			return new Plot( x, y, opts );
		}
		return new Plot( opts );
	}
}
Returns a reusable function for generating plots.

@param {Options} [options] - factory options
TODO
@throws {TypeError} must provide an object
@returns {Function} plot function

@example
var opts = {
    'width': 600,
    'height': 400
};
var plot = factory( opts );
var h1 = plot( [[1,2,3]], [[1,0,1]] );
var h2 = plot( [[4,5,6]], [[0,1,0]] );