Table of Contents

Module: termdefs Gnuplot/termdefs.py

Terminal definition file.

This module describes the options available to gnuplot's various terminals. For the moment, it only supports a few terminals, but the infrastructure is here to add others as they are needed.

Part of the trick is that the set terminal command takes myriad suboptions with various argument types, and order is sometimes significant. The other part of the trick is that there are over 50 terminal types, and each terminal has its own set of options.

The strategy here is to define a general mechanism for turning Python keyword parameters into fragments of gnuplot command strings. There are a number of classes derived from Arg that do this. Some take string args, some boolean, etc. Then the list of options that each terminal accepts is stored in the terminal_opts dictionary. Gnuplot.hardcopy(), in turn, uses this dictionary to interpret its keyword arguments and build the set terminal command.

Imported modules   
import Errors
import gp
import types
Classes   

Arg

Process terminal subargs and return a command fragment.

ArgOneParam

Arg abstract base class specialized for exactly one parameter.

BareStringArg

An arbitrary argument output without quotes.

BooleanArg

An argument that takes a true/false value.

KeywordArg

Represent an argument that must be passed as a keyword to gnuplot.

KeywordOrBooleanArg

Allow a keyword arg to be specified either as a keyword or a boolean.

MutuallyExclusiveArgs

A group of args, of which either zero or one may be set, but not more.

StringArg

An option taking a quoted string argument.


Table of Contents

This document was automatically generated on Sun Oct 19 17:10:22 2003 by HappyDoc version 2.1