home *** CD-ROM | disk | FTP | other *** search
-
- ΓòÉΓòÉΓòÉ 1. About ΓòÉΓòÉΓòÉ
-
- Generated on Wed Mar 7 02:41:15 2001, by Perl version 5.00553, pod2ipf version
- 1.16 with arguments "--head-off=1" "--title" "Gnuplot low-level plotting API"
- "--by-files" "Gnuplot.pm" "GnuplotTerminals.pod" in directory
- I:/get/gnuplot-api-os2/examples.
-
-
- ΓòÉΓòÉΓòÉ 2. Gnuplot - lowlevel graphics using gnuplot drawing routines. ΓòÉΓòÉΓòÉ
-
- Gnuplot - lowlevel graphics using gnuplot drawing routines.
-
- NAME
- SYNOPSIS
- EXPORTS
- - Exportable and export tags:
- DESCRIPTION
- gnuplot term/README
- Using Term::Gnuplot from C libraries
- - Runtime link with gnuplot DLL
- - Runtime link of a Perl module with Term::Gnuplot
- - Using different Plotting libraries
- Examples
- - High-level plotting
- - Multifile plotting
- BUGS and LIMITATIONS
- SEE ALSO
-
-
- ΓòÉΓòÉΓòÉ 2.1. NAME ΓòÉΓòÉΓòÉ
-
- Term::Gnuplot - lowlevel graphics using gnuplot drawing routines. Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.2. SYNOPSIS ΓòÉΓòÉΓòÉ
-
- use Term::Gnuplot ':ALL';
- list_terms();
- change_term('dumb') or die "Cannot set terminal.\n";
- term_init(); # init()
- term_start_plot(); # graphics();
- $xmax = scaled_xmax();
- $ymax = scaled_ymax();
- linetype(-2);
- move(0,0);
- vector($xmax-1,0);
- vector($xmax-1,$ymax-1);
- vector(0,$ymax-1);
- vector(0,0);
- justify_text(LEFT);
- put_text(h_char()*5, $ymax - v_char()*3,"Terminal Test, Perl");
- $x = $xmax/4;
- $y = $ymax/4;
- $xl = h_tic()*5;
- $yl = v_tic()*5;
- linetype(2);
- arrow($x,$y,$x+$xl,$y,1);
- arrow($x,$y,$x+$xl/2,$y+$yl,1);
- arrow($x,$y,$x,$y+$yl,1);
- arrow($x,$y,$x-$xl/2,$y+$yl,0);
- arrow($x,$y,$x-$xl,$y,1);
- arrow($x,$y,$x-$xl,$y-$yl,1);
- arrow($x,$y,$x,$y-$yl,1);
- arrow($x,$y,$x+$xl,$y-$yl,1);
- term_end_plot(); # text();
- Term::Gnuplot::reset();
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.3. EXPORTS ΓòÉΓòÉΓòÉ
-
- None by default. Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.3.1. Exportable and export tags: ΓòÉΓòÉΓòÉ
-
- :SETUP
-
- change_term test_term init_terminal list_terms plot_outfile_set
- term_init term_start_plot term_end_plot
- term_start_multiplot term_end_multiplot plotsizes_scale
- setcanvas
-
- :JUSTIFY
-
- LEFT CENTRE RIGHT
-
- :FIELDS
-
- name description xmax ymax v_char h_char v_tic h_tic
- scaled_xmax scaled_ymax
-
- :METHODS
-
- init scale graphics linetype move vector point text_angle
- justify_text put_text arrow text
-
- %description Hash of name => description pairs. In particular, keys
- %description contains names of supported terminals.
-
- :ALL All of the above.
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.4. DESCRIPTION ΓòÉΓòÉΓòÉ
-
- Below I include the contents of the file term/README from gnuplot distribution
- (see gnuplot term/README). It explains the meaning of the methods of SYNOPSIS.
-
- All methods are supported under Perl, the options method is available as
- set_options(). The discription below includes underscores, that are deleted in
- the perl interface.
-
- The functions which are not included in the description below:
-
- change_term($newname)
-
- test_term()
-
- init_terminal() self-explanatory.
-
- list_terms() Print names/descriptions of supported terminals.
-
- plot_outfile_set($filename) set the output file. This should be done before
- setting the terminal type.
-
- plotsizes_scale($xfactor, $yfactor) set the size of the output device (such as
- a graphic file) in fractions of the default size. Some output drivers
- may ignore this request. The request is active until the next request.
-
- Does not change sizes reported by xmax() and ymax()! After such a
- call one should use the following calls:
-
- scaled_xmax(), scaled_ymax() Report xmax() and ymax() corrected by the scaling
- factors given to plotsizes_scale().
-
- term_init(), term_start_plot(), term_end_plot() higher-level functions
- variants of init(), graphics(), text(). Should be prefered over
- init(), graphics(), text() if the output file is changed, since they
- take into account resetting of output file mode (if needed).
-
- term_start_multiplot(), term_end_multiplot() Interfaces to C functions with
- the same names. How to use them outside of gnuplot proper is not clear.
-
- _term_descrs() Returns hash of names/descriptions of supported terminals
- (available as %Term::Gnuplot::description too).
-
- setcanvas($ptk_canvas) Sets the Tk widget for direct-draw operations (may be
- used with terminal 'tkcanvas' with the option 'tkperl_canvas').
-
- NOTE. Some terminals require calling set_options() before init()! Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.5. gnuplot term/README ΓòÉΓòÉΓòÉ
-
- DOCUMENTATION FOR GNUPLOT TERMINAL DRIVER WRITERS
-
- By Russell Lang 1/90
-
- Updated for new file layout by drd 4/95
-
- Paragraphs about inclusion of TERM_HELP added by rcc 1/96
-
- No change to the interface between gnuplot and the terminal drivers, but we
- would like to make the terminal drivers standalone
-
- 1) in order move the support for the terminal drivers outside of the
- support for the main program, thereby encouraging a library of
- contributed drivers
- 2) To make it easy for users to add contributed drivers, by adding
- a single #include line to term.h
- 3) To allow individual compilation on DOS, to save the overlay
- manager from having to load _all_ drivers together.
-
- CORRECTION - scale() interface is no longer supported, since it is incompatible
- with multiplot.
-
- Whole of terminal driver should be contained in one <driver>.trm file, with a
- fairly strict layout as detailed below - this allows the gnuplot maintainers to
- change the way the terminal drivers are compiled without having to change the
- drivers themselves.
-
- term.h, and therefore each file.trm file, may be loaded more than once, with
- different sections selected by macros.
-
- Each driver provides all the functions it needs, and a table of function
- pointers and other data to interface to gnuplot. The table entry is currently
- defined as follows in plot.h:
-
- struct TERMENTRY {
-
- /* required entries */
-
- char *name;
- char *description;
- unsigned int xmax,ymax,v_char,h_char,v_tic,h_tic;
-
- void (*options) __PROTO((void));
- void (*init) __PROTO((void));
- void (*reset) __PROTO((void));
- void (*text) __PROTO((void));
- int (*scale) __PROTO((double, double));
- void (*graphics) __PROTO((void));
- void (*move) __PROTO((unsigned int, unsigned int));
- void (*vector) __PROTO((unsigned int, unsigned int));
- void (*linetype) __PROTO((int));
- void (*put_text) __PROTO((unsigned int, unsigned int,char*));
-
- /* optional entries */
-
- int (*text_angle) __PROTO((int));
- int (*justify_text) __PROTO((enum JUSTIFY));
- void (*point) __PROTO((unsigned int, unsigned int,int));
- void (*arrow) __PROTO((unsigned int, unsigned int, unsigned int,
- unsigned int, int));
- int (*set_font) __PROTO((char *font)); /* "font,size" */
- void (*set_pointsize) __PROTO((double size)); /* notification of set pointsize */
- int flags; /* various flags */
- void (*suspend) __PROTO((void)); /* after one plot of multiplot */
- void (*resume) __PROTO((void)); /* before subsequent plot of multiplot */
- void (*boxfill) __PROTO((int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height)); /* clear part of multiplot */
- void (*linewidth) __PROTO((double linewidth));
- void (*pointsize) __PROTO((double pointsize));
- };
-
- One consequence of (1) is that we would like drivers to be backwards compatible
- - drivers in the correct form below should work in future versions of gnuplot
- without change. C compilers guarantee to fill unitialised members of a
- structure to zero, so gnuplot can detect old drivers, in which fields have not
- been initalised, and can point new interface entry pointers to dummy functions.
-
- We can add fields to the terminal structure, but only at the end of the list.
- If you design a terminal that cant work without a new interface being defined,
- and consequent changes to the main gnuplot source, please contact
- bug-gnuplot@dartmouth.edu simply to ensure that you have the most up to date
- defn of the terminal structure. Also, please ensure that the 'set term' command
- checks for 0 values in added fields when an old driver is selected, and a
- pointer to a suitable 'cant do' function is provided. It is therefore not
- required (and in fact not possible) to add padding fields to the end of all drivers.
-
- Similarly, if you add an optional field to an old driver, take care to ensure
- that all intervening fields are padded with zeros.
-
- Some of the above fields are required - this should not be a problem, since
- they were all required in earlier releases of gnuplot. The later fields are
- interfaces to capabilities that not all devices can do, or for which the
- generic routines provided should be adequate. There are several null ('cant
- do') functions provided by term.c which a driver can reference in the table.
- Similarly, for bitmap devices, there are generic routines for lines and text
- provided by bitmap.c
-
- Here's a brief description of each variable:
-
- The char *name is a pointer to a string containing the name of the terminal.
- This name is used by the 'set terminal' and 'show terminal' commands. The name
- must be unique and must not be confused with an abbreviation of another name.
- For example if the name "postscript" exists, it is not possible to have another
- name "postscript2". Keep the name under 15 characters.
-
- The char *description is a pointer to a string containing a description of the
- terminal, which is displayed in response to the 'set terminal' command. Keep
- the description under 60 characters.
-
- xmax is the maximum number of points in the x direction. The range of points
- used by gnuplot is 0 to xmax-1.
-
- ymax is the maximum number of points in the y direction. The range of points
- used by gnuplot is 0 to ymax-1.
-
- v_char is the height of characters, in the same units as xmax and ymax. The
- border for labelling at the top and bottom of the plot is calculated using
- v_char. v_char is used as the vertical line spacing for characters.
-
- h_char is the width of characters, in the same units as xmax and ymax. The
- border for labelling at the left and right of the plot is calculated using
- h_char, for example. If the _justify_text function returns FALSE, h_char is
- used to justify text right or centre. If characters are not fixed width, then
- the _justify_text function must correctly justify the text.
-
- v_tic is the vertical size of tics along the x axis, in the same units as ymax.
-
- h_tic is the horizontal size of tics along the y axis, in the same units as xmax.
-
- v_tic and h_tic should give tics of the same physical size on the output. The
- ratio of these two quantities is used by gnuplot to set the aspect ratio to 1
- so that circles appear circular when 'set size square' is active.
-
- All the above values need not be static - values can be substituted into the
- table during terminal initialisation, based on options for example.
-
- Here's a brief description of what each term.c function does:
-
- _options() Called when terminal type is selected. This procedure should parse
- options on the command line. A list of the currently selected options should
- be stored in term_options[] in a form suitable for use with the set term
- command. term_options[] is used by the save command. Use options_null() if no
- options are available.
-
- _init() Called once, when the device is first selected. This procedure
- should set up things that only need to be set once, like handshaking and
- character sets etc... There is a global variable 'pointsize' which you might
- want to use here. If set pointsize is issued after init has been called, the
- set_pointsize() function is called.
-
- _reset() Called when gnuplot is exited, the output device changed or the
- terminal type changed. This procedure should reset the device, possibly
- flushing a buffer somewhere or generating a form feed.
-
- _scale(xs,ys) Called just before _graphics(). This takes the x and y scaling
- factors as information. If the terminal would like to do its own scaling, it
- returns TRUE. Otherwise, it can ignore the information and return FALSE:
- do_plot will do the scaling for you. null_scale is provided to do just this, so
- most drivers can ignore this function entirely. The Latex driver is currently
- the only one providing its own scaling. PLEASE DO NOT USE THIS INTERFACE - IT
- IS NOT COMPATIBLE WITH MULTIPLOT.
-
- _graphics() Called just before a plot is going to be displayed. This
- procedure should set the device into graphics mode. Devices which can't be
- used as terminals (like plotters) will probably be in graphics mode always and
- therefore won't need this.
-
- _text() Called immediately after a plot is displayed. This procedure should
- set the device back into text mode if it is also a terminal, so that commands
- can be seen as they're typed. Again, this will probably do nothing if the
- device can't be used as a terminal. This call can be used to trigger conversion
- and output for bitmap devices.
-
- _move(x,y) Called at the start of a line. The cursor should move to the
- (x,y) position without drawing.
-
- _vector(x,y) Called when a line is to be drawn. This should display a line
- from the last (x,y) position given by _move() or _vector() to this new (x,y) position.
-
- _linetype(lt) Called to set the line type before text is displayed or line(s)
- plotted. This procedure should select a pen color or line style if the device
- has these capabilities. lt is an integer from -2 to 0 or greater. An lt of -2
- is used for the border of the plot. An lt of -1 is used for the X and Y axes.
- lt 0 and upwards are used for plots 0 and upwards. If _linetype() is called
- with lt greater than the available line types, it should map it to one of the
- available line types. Most drivers provide 9 different linetypes (lt is 0 to 8).
-
- _put_text(x,y,str) Called to display text at the (x,y) position, while in
- graphics mode. The text should be vertically (with respect to the text)
- justified about (x,y). The text is rotated according to _text_angle and then
- horizontally (with respect to the text) justified according to _justify_text.
-
- The following are optional
-
- _text_angle(ang) Called to rotate the text angle when placing the y label. If
- ang = 0 then text is horizontal. If ang = 1 then text is vertically upwards.
- Returns TRUE if text can be rotated, FALSE otherwise. [But you must return TRUE
- if called with ang=0]
-
- _justify_text(mode) Called to justify text left, right or centre. If mode =
- LEFT then text placed by _put_text is flushed left against (x,y). If mode =
- CENTRE then centre of text is at (x,y). If mode = RIGHT then text is placed
- flushed right against (x,y). Returns TRUE if text can be justified Returns
- FALSE otherwise and then _put_text assumes text is flushed left; justification
- of text is then performed by calculating the text width using strlen(text) * h_char.
-
- _point(x,y,point) Called to place a point at position (x,y). point is -1 or
- an integer from 0 upwards. At least 6 point types (numbered 0 to 5) are
- normally provided. Point type -1 is a dot. If point is more than the available
- point types then it should be mapped back to one of the available points. Two
- _point() functions called do_point() and line_and_point() are provided in
- term.c and should be suitable for most drivers. do_point() draws the points in
- the current line type. If your driver uses dotted line types (generally because
- it is monochrome), you should use line_and_point() which changes to line type 0
- before drawing the point. line type 0 should be solid.
-
- There is a global variable 'pointsize' which is controlled by the set
- pointsize command. If possible, use that. pointsize should be examined at
- terminal init. If it is subsequently changed, the set_pointsize() fn will be called.
-
- _arrow(sx,sy,ex,ey,head) Called to draw an arrrow from (sx,sy) to (ex,ey). A
- head is drawn on the arrow if head = TRUE. An _arrow() function called
- do_arrow() is provided in term.c which will draw arrows using the _move() and
- _vector() functions. Drivers should use do_arrow unless it causes problems.
-
- _set_font() is called to set the font of labels, etc [new 3.7 feature] fonts
- are selected as strings "name,size"
-
- _pointsize() is used to set the pointsize for subsequent points
-
- _flags stores various flags describing driver capabilities. Currently
- three bits are allocated
- - TERM_CAN_MULTIPLOT - driver can do multiplot
- fully-interactively when output is not redirected. ie text and graphics
- go to different places, or driver can flip using suspend.
- - TERM_CANT_MULTIPLOT - driver cannot multiplot, even if output
- is redirected.
- - TERM_BINARY - output file must be opened in binary mode
- Another bit is earmarked for VMS_PASTHRU, but not yet implemented.
-
- _suspend() - called before gnuplot issues a prompt in multiplot mode
- linux vga driver uses this entry point to flip from graphics to
- text mode. X11 driver will take this opportunity to paint the window
- on the display.
-
- _resume() - called after suspend(), before subsequent plots of a multiplot.
-
- _boxfill() - fills a box in given style (currently unimplemented - always
- background colour at present). used by 'clear' in multiplot for
- support of inset graphs
-
- _linewidth() - sets the linewidth
-
- The following should illustrate the order in which calls to these routines are
- made:
-
- _options()
- _init()
- _scale(xs,ys)
- _graphics()
- _linewidth(lw)
- _linetype(lt)
- _move(x,y)
- _vector(x,y)
- _pointsize(size)
- _point(x,y,point)
- _text_angle(angle)
- _justify(mode)
- _set_font(font)
- _put_text(x,y,text)
- _arrow(sx,sy,ex,ey)
- _text()
- _graphics()
- .
- _suspend()
- _set_pointsize()
- _resume()
- .
- _text()
- _reset()
-
- ------------------------------------
-
- BITMAP DEVICES
-
- A file bitmap.c is provided, implementing a generic set of bitmap routines. It
- provides all the routines required to generate a bitmap in memory, drawing
- lines and writing text. A simple driver need provide only a text() entry point,
- which converts and outputs the stored bitmap in the format required by the device.
-
- Internally, the bitmap is built of one or more planes of 1 bit per pixel. In
- fact, I think the library would be easier to use if it offered one or more
- planes of pixels with 1,2,4 or 8 bits per pixel, since not all bitmap devices
- are based on planes, and the planes have to be recombined at the end at
- present. In general, a device would use either planes or bits-per-pixel, though
- I guess a 24-bit bitmap could use 3 planes of 8 bits per pixel..?
-
- The pixels are currently organised horizontally packed into bytes.
-
- ie
-
- ********%%%%%%%%$$$$$$$$!!!!!!!! etc
- ^^^^^^^^@@@@@@@@########++++++++ etc
-
- where like symbols are stored in one byte. Vertical packing can be arranged by
- reversing x and y dimensions and setting the global b_rastermode to TRUE. (eg
- epson 8-pin dot-matrix printer)
-
- Functions provided are
-
- (internal fns ? - should probably be static, not external ?)
-
- b_setpixel(x,y,value)
- b_setmaskpixel(x,y,value)
- b_putc(x,y,char,angle)
- b_setvalue(size)
-
- setting up stuff
-
- b_makebitmap(x,y,planes) - make a bitmap of size x * y
- b_freebitmap() - free bitmap
- b_charsize(size)
-
- gnuplot driver interface functions (can go straight into gnuplot structure)
-
- b_setlinetype(linetype)
- b_move(x,y)
- b_vector(x,y)
- b_put_text(x,y,*str)
- b_text_angle(ang)
-
- I think that the library could be made easier to use if we defined a structure
- which described the bitmap (raster mode, planes, bits-per-pixel, colours, etc)
- and then added to the gnuplot term struct a pointer to this structure. Then we
- could have b_graphics() routine which did all the initialisation that presently
- has to be done by the driver graphics() entry point. Also, one day I would
- like to have parsing, including terminal driver options, table-driven, but I'm
- getting ahead of myself here.
-
- At present, bitmap.c is linked into gnuplot unconditionally. Perhaps it should
- be put into a library, so that it is linked in only if any of the user-selected
- drivers require bitmap support.
-
- There may be scope to do similar things with some of the other stuff that is
- shared by several drivers. Rather than requiring, for example, that LATEX
- driver is required if EMTEX is to be used, the shared routines could be
- extracted to a library and linked if any of the drivers which use them are
- used. Just a thought...
-
- ------------------------------------
-
- FILE LAYOUT -----------
-
- I think a file layout like the following will leave most flexibility to the
- gnuplot maintainers. I use REGIS for example.
-
- #include "driver.h"
-
- #ifdef TERM_REGISTER
- register_term(regis) /* no ; */
- #endif
-
- #ifdef TERM_PROTO
- TERM_PUBLIC void REGISinit __PROTO((void));
- TERM_PUBLIC void REGISgraphics __PROTO((void));
- /* etc */
- #define GOT_REGIS_PROTO
- #endif
-
- #ifndef TERM_PROTO_ONLY
- #ifdef TERM_BODY
-
- TERM_PUBLIC void REGISinit()
- {
- /* etc */
- }
-
- /* etc */
-
- #endif
-
- #ifdef TERM_TABLE
-
- TERM_TABLE_START(regis_driver)
- /* no { */
- "regis", "REGIS graphics language",
- REGISXMAX, /* etc */
- /* no } */
- TERM_TABLE_END(regis_driver)
-
- #undef LAST_TERM
- #define LAST_TERM regis_driver
-
- #endif /* TERM_TABLE */
- #endif /* TERM_PROTO_ONLY */
-
- #ifdef TERM_HELP
- START_HELP(regis)
- "1 regis",
- "?set terminal regis",
- "?regis",
- " The `regis` terminal device generates output in the REGIS graphics language.",
- " It has the option of using 4 (the default) or 16 colors.",
- "",
- " Syntax:",
- " set term regis {4 | 16}"
- END_HELP(regis)
- #endif
-
- --------------
-
- The first three lines in the TERM_HELP section must contain the same name as
- that specified by register_term, since this is the name that will be entered
- into the list of available terminals. If more than one name is registered, the
- additional names should have their own two "?" lines, but not the "1" line.
-
- Each record is enclosed in double-quotes and (except for the last record)
- followed by a comma. The text is copied as a single string into gnuplot.doc,
- so the syntax must obey the rules of that entity. If the text includes
- double-quotes or backslashes, these must be escaped by preceding each occurence
- with a backslash.
-
- --------------
-
- Rationale:
-
- We may want to compile all drivers into term.c or one driver at a time this
- layout should support both TERM_PUBLIC will be static if all modules are in
- term.c, or blank otherwise. Please make private support functions static if possible.
-
- We may include term.h, and therefore all these files, one or more times. If
- just once (all modules compiled into term.c) putting the four parts in this
- order should make it work.
-
- we may compile the table entries into either an array or a linked list This
- organisation should support both
-
- For separate compilation, we may write a program which defines TERM_REGISTER
- and #include term.h to find out which drivers are selected in term.h and
- thereby generate a makefile.
-
- For a driver which depends on another (eg enhpost and pslatex on post) the
- driver can do something like
-
- #ifndef GOT_POST_PROTO
- #define TERM_PROTO_ONLY
- #include "post.trm"
- #undef TERM_PROTO_ONLY
- #endif
-
- this is probably needed only in the TERM_TABLE section only, but may also be
- used in the body. The TERM_PROTO_ONLY means that we pick up only the protos
- from post.trm, even if current driver is being compiled with TERM_BODY or TERM_TABLE
-
- If we do it the linked-list way, the arg to TERM_TABLE_START will be the name
- of the variable, so any valid, unique name is fine. The TERM_TABLE_START macro
- will do all the work of linking the entries together, probably using LAST_TERM
-
- The inclusion of the TERM_HELP section (and removal of terminal documentation
- from the master gnuplot.doc file) means that the online help will include
- discussions of only those terminals available to the user. For generation of
- the printed manual, all can be included.
-
- Please make as many things as possible static, but do still try to use unique
- names since all drivers may all be compiled into term.o
-
- The bit in the PROTO section is basically what you would put into a .h file if
- we had them - everything that is needed by the TABLE_ENTRY should be defined in
- this part. In particular, dont forget all the maxes and character sizes and
- things for the table entry.
-
- Dont forget to put TERM_PUBLIC in the defns of the fns as well as the
- prototypes. It will probably always expand to 'static' except for pcs. Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.6. Using Term::Gnuplot from C libraries ΓòÉΓòÉΓòÉ
-
- The interface of this module to gnuplot version 3.7 is going via a translation
- layer in Gnuplot.h. This layer isolates low-level drawing routines from
- gnuplot program. (In doing this unsupported job it does some nasty thing, in
- particular Gnuplot.h cannot be included in more than one C compilation unit.)
-
- In fact Gnuplot.h can be used by any C program or library which wants to use
- device-independent plotting routines of gnuplot.
-
- C library should use the same syntax of calls as Term::Gnuplot, with the only
- difference that to call low-level _init() method one calls gptable_init(), to
- set terminal one calls termset(name), and to get a property of terminal (say
- xmax) one uses termprop(xmax).
-
- To set options one can setup the array token and data c_token, num_tokens,
- input_line, then call options(). Alternately, one can define
- SET_OPTIONS_FROM_STRING, then a call set_options_from(string) is avalable.
- This call will set up all these variables and will call options(). However,
- the logic of the parsing of the string is very primitive.
-
- NOTES.
-
- To initialize the facilities of Gnuplot.h from C one needs to call
- setup_gpshim(). This call can be made as many times as wanted, only the
- first call will do anything.
-
- NULL argument to term_set_output() means "reset back to stdout".
-
- Gnuplot.h expects that the macro/function croak(...) is defined. This
- function should have the same syntax as printf(), and should not return.
- It is used as an error-reporting function.
-
- One should define functions int StartOutput(), int EndOutput() and int
- OutLine(char *s) which will be used by gnuplot for error messages and for
- terminal listing. Alternatively, one can define GNUPLOT_OUTLINE_STDOUT,
- and gnuplot will put these messages to stdout.
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.6.1. Runtime link with gnuplot DLL ΓòÉΓòÉΓòÉ
-
- There are two different ways to use the plotting calls via Gnuplot.h. One can
- either establish the link to gnuplot library at compile/link time, or to
- postpone this link to run time. By default Gnuplot.h provides the first way,
- to switch to the second way define DYNAMIC_GNUPLOT before including Gnuplot.h.
-
- To establish a link at run time, one needs to load a dynamic library which is
- compiled from Gnuplot.h - but without DYNAMIC_GNUPLOT defined. Feed the result
- of the call to get_term_ftable() as an argument to set_term_ftable(), as in
- (with error-condition checking disabled):
-
- typedef struct t_ftable *(*g_ftable)(void);
- g_ftable g_ftable_addr;
- void *handle = dlopen("gnuterm.dll", mode);
-
- g_ftable_addr = (g_ftable) dlsym(handle, "get_term_ftable");
- set_term_ftable((*g_ftable_addr)());
-
- This means that any C library/program which uses the API provided by Gnuplot.h
- does not need to be even linked with gnuplot, neither it requires include files
- of gnuplot. If plotting is done in some situations only, one will not need the
- overhead of gnuplot plotting library (gnuterm.dll in the above example) unless
- plotting is requested. Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.6.2. Runtime link of a Perl module with Term::Gnuplot ΓòÉΓòÉΓòÉ
-
- To facilitate run time link the Term::Gnuplot Perl module provides a Perl
- subroutine get_term_ftable() which is a variant of C get_term_ftable() which
- returns an integer instead of an address. One can feed this integer to a C
- function v_set_term_ftable(void*), which will establish a runtime link. Thus
- the external XS library which wants to use Term::Gnuplot at runtime can put
- this in .xs file:
-
- #define int_set_term_ftable(a) (v_set_term_ftable((void*)a))
- extern void v_set_term_ftable(void *a);
- ...
-
- void
- int_set_term_ftable(a)
- IV a
-
- include Gnuplot.h (with DYNAMIC_GNUPLOT defined) into any C file, and define
- this Perl subroutine
-
- sub link_gnuplot {
- eval 'use Term::Gnuplot 0.56; 1' or die;
- int_set_term_ftable(Term::Gnuplot::get_term_ftable());
- }
-
- in .pm file.
-
- Now if it needs to do plotting, it calls link_gnuplot(), then does the
- plotting - without a need to interact with gnuplot at compile/link time, and
- having the additional burden of low-level plotting code loaded in the executable/DLL.
-
- After a call link_gnuplot(), all the Gnuplot.h API calls made from the above C
- file will be directed through the vtables of the Perl module Term::Gnuplot. Go
- Up
-
-
- ΓòÉΓòÉΓòÉ 2.6.3. Using different Plotting libraries ΓòÉΓòÉΓòÉ
-
- In fact Gnuplot.h knows almost nothing about gnuplot, with a notable exceptions
- that there is an API call term = change_term(name), which returns a table of
- methods. Thus in principle Gnuplot.h can establish a runtime-link with any
- plotting library which supports (or can be coerced to support) this call. (The
- table is assumed to be compatible with gnuplot layout of struct termentry.)
-
- Gnuplot.h uses also a handful of other gnuplot APIs (such as changing output
- file and several initialization shortcuts), but they should be easy to be
- ignored if an interface to another plotting library is needed. Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.7. Examples ΓòÉΓòÉΓòÉ
-
- Examples
-
- High-level plotting
- Multifile plotting
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.7.1. High-level plotting ΓòÉΓòÉΓòÉ
-
- sub ploth {
- my ($xmin, $xmax, $sub) = (shift, shift, shift);
- my $wpoints = scaled_xmax() - 1;
- my $hpoints = scaled_ymax() - 1;
- my $delta = ($xmax - $xmin)/$wpoints;
- my (@ys, $y);
- my ($ymin, $ymax) = (1e300, -1e300);
- my $x = $xmin;
- for my $i (0 .. $wpoints) {
- $y = $sub->($x);
- push @ys, $y;
- $ymin = $y if $ymin > $y;
- $ymax = $y if $ymax < $y;
- $x += $delta;
- }
- my $deltay = ($ymax - $ymin)/$hpoints;
- $_ = ($_ - $ymin)/$deltay + $yfix for @ys;
-
- term_start_plot();
-
- linetype -2;
- move 0, $yfix;
- vector 0, $hpoints + $yfix;
- vector $wpoints, $hpoints + $yfix;
- vector $wpoints, $yfix;
- vector 0, $yfix;
-
- linetype -1;
- if ($xmin < 0 && $xmax > 0) {
- my $xzero = -$xmin/$delta;
- move $xzero, $yfix;
- vector $xzero, $hpoints + $yfix;
- }
- if ($ymin < 0 && $ymax > 0) {
- my $yzero = -$ymin/$deltay + $yfix;
- move 0, $yzero;
- vector $wpoints, $yzero;
- }
-
- linetype 0;
- move 0, int($ys[0] + 0.5);
- linetype 0;
- for my $i (1 .. $wpoints) {
- $x += $delta;
- vector $i, int($ys[$i] + 0.5);
- }
- term_end_plot();
- }
-
- This function should be used as in
-
- ploth(-1,3, sub { sin( (shift)**6 ) })
-
- $yfix should be set to 1 for gif terminal to compensate for off-by-one bug. Go
- Up
-
-
- ΓòÉΓòÉΓòÉ 2.7.2. Multifile plotting ΓòÉΓòÉΓòÉ
-
- use strict;
- use Term::Gnuplot qw(:ALL);
-
- my ($yfix, $ext) = (1, 'gif');
- plot_outfile_set "manypl1.$ext"; # Need to set before plotterm()
-
- change_term "gif";
- set_options "size", 300, ',', 200;
- term_init();
-
- for my $k (1..6) {
- plot_outfile_set "manypl$k.$ext" unless $k == 1;
- ploth( -1, 3, sub { sin((shift)**$k) } );
- }
-
- Here we use the function ploth() from High-level plotting, it should be in the
- same scope so that $yfix is visible there. Note that gif terminal requires
- $yfix to be 1 to circumvent a bug, and requires a literal ',' in the
- set_options call.
-
- If a terminal does not support direct setting of the size of the output
- device, one may set global rescaling factors by calling plotsizes_scale():
-
- plotsizes_scale(300/xmax(), 200/ymax());
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.8. BUGS and LIMITATIONS ΓòÉΓòÉΓòÉ
-
- The following C macros are set to reasonable values, no peeking is performed to
- get correct values, this may break Gnuplot on some systems:
-
- NO_ATEXIT HAVE_ON_EXIT PIPES HAVE_LIBC_H
-
- No testing for
-
- X11
-
- macros is performed either, however, this may only increase size of the
- executable (since X11 module is not making any direct X calls, but calls an
- external program to serve the requests).
-
- Apparently gif terminal has off-by-one error: yrange is 1..ymax(). All the
- bugs of gnuplot low-level plotting show in this module as well. Go Up
-
-
- ΓòÉΓòÉΓòÉ 2.9. SEE ALSO ΓòÉΓòÉΓòÉ
-
- Term::GnuplotTerminals. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3. GnuplotTerminals - documentation of gnuplot output devices ΓòÉΓòÉΓòÉ
-
- GnuplotTerminals - documentation of gnuplot output devices
-
- NAME
- aed767
- aifm
- amiga
- apollo
- atari ST (via AES)
- atari ST (via VDI)
- cgi
- cgm
- - font
- - fontsize
- - linewidth
- - rotate
- - solid
- - size
- - width
- - winword6
- corel
- debug
- svga
- dumb
- dxf
- dxy800a
- eepic
- emxvga
- epson-180dpi
- excl
- hercules
- fig
- gif
- unixplot
- gpic
- gpr
- grass
- hp2623a
- hp2648
- hp500c
- hpgl
- hpljii
- hppj
- imagen
- iris4d
- kyo
- latex
- linux
- macintosh
- mf
- - METAFONT Instructions
- mgr
- mif
- mtos
- next
- pbm
- dospc
- pm
- png
- postscript
- - enhanced postscript
- - editing postscript
- pslatex and pstex
- pstricks
- qms
- regis
- rgip
- sun
- tek410x
- table
- tek40
- texdraw
- tgif
- tkcanvas
- tpic
- unixpc
- unixplot
- vx384
- VWS
- windows
- - graph-menu
- - printing
- - text-menu
- - wgnuplot.ini
- - windows3.0
- x11
- - command-line_options
- - monochome_options
- - color_resources
- - grayscale_resources
- - line_resources
- xlib
- AUTHOR
- SEE ALSO
-
-
- ΓòÉΓòÉΓòÉ 3.1. NAME ΓòÉΓòÉΓòÉ
-
- Term::GnuplotTerminals - documentation of gnuplot output devices Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.2. aed767 ΓòÉΓòÉΓòÉ
-
- The aed512 and aed767 terminal drivers support AED graphics terminals. The two
- drivers differ only in their horizontal ranges, which are 512 and 768 pixels,
- respectively. Their vertical range is 575 pixels. There are no options for
- these drivers. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.3. aifm ΓòÉΓòÉΓòÉ
-
- Several options may be set in aifm---the Adobe Illustrator 3.0+ driver.
-
- Syntax:
-
- set terminal aifm {<color>} {"<fontname>"} {<fontsize>}
-
- <color> is either color or monochrome; "<fontname>" is the name of a valid
- PostScript font; <fontsize> is the size of the font in PostScript points,
- before scaling by the set size command. Selecting default sets all options to
- their default values: monochrome, "Helvetica", and 14pt.
-
- Since AI does not really support multiple pages, multiple graphs will be drawn
- directly on top of one another. However, each graph will be grouped
- individually, making it easy to separate them inside AI (just pick them up and
- move them).
-
- Examples:
-
- set term aifm
- set term aifm 22
- set size 0.7,1.4; set term aifm color "Times-Roman" 14
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.4. amiga ΓòÉΓòÉΓòÉ
-
- The amiga terminal, for Commodore Amiga computers, allows the user to plot
- either to a screen (default), or, if Kickstart 3.0 or higher is installed, to a
- window on the current public screen. The font and its size can also be selected.
-
- Syntax:
-
- set terminal amiga {screen | window} {"<fontname>"} {<fontsize>}
-
- The default font is 8-point "topaz".
-
- The screen option uses a virtual screen, so it is possible that the graph will
- be larger than the screen. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.5. apollo ΓòÉΓòÉΓòÉ
-
- The apollo terminal driver supports the Apollo Graphics Primitive Resource with
- rescaling after window resizing. It has no options.
-
- If a fixed-size window is desired, the gpr terminal may be used instead. Go
- Up
-
-
- ΓòÉΓòÉΓòÉ 3.6. atari ST (via AES) ΓòÉΓòÉΓòÉ
-
- The atari terminal has options to set the character size and the screen colors.
-
- Syntax:
-
- set terminal atari {<fontsize>} {<col0> <col1> ... <col15.}
-
- The character size must appear if any colors are to be specified. Each of the
- (up to 16) colors is given as a three-digit hex number, where the digits
- represent RED, GREEN and BLUE (in that order). The range of 0--15 is scaled to
- whatever color range the screen actually has. On a normal ST screen, odd and
- even intensities are the same.
-
- Examples:
-
- set terminal atari 4 # use small (6x6) font
- set terminal atari 6 0 # set monochrome screen to white on black
- set terminal atari 13 0 fff f00 f0 f ff f0f
- # set first seven colors to black, white, green, blue,
- # cyan, purple, and yellow and use large font (8x16).
-
- Additionally, if an environment variable GNUCOLORS exists, its contents are
- interpreted as an options string, but an explicit terminal option takes
- precedence. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.7. atari ST (via VDI) ΓòÉΓòÉΓòÉ
-
- The vdi terminal is the same as the atari terminal, except that it sends output
- to the screen via the VDI and not into AES-Windows.
-
- The vdi terminal has options to set the character size and the screen colors.
-
- Syntax:
-
- set terminal vdi {<fontsize>} {<col0> <col1> ... <col15.}
-
- The character size must appear if any colors are to be specified. Each of the
- (up to 16) colors is given as a three-digit hex number, where the digits
- represent RED, GREEN and BLUE (in that order). The range of 0--15 is scaled to
- whatever color range the screen actually has. On a normal ST screen, odd and
- even intensities are the same.
-
- Examples:
-
- set terminal vdi 4 # use small (6x6) font
- set terminal vdi 6 0 # set monochrome screen to white on black
- set terminal vdi 13 0 fff f00 f0 f ff f0f
- # set first seven colors to black, white, green, blue,
- # cyan, purple, and yellow and use large font (8x16).
-
- Additionally, if an environment variable GNUCOLORS exists, its contents are
- interpreted as an options string, but an explicit terminal option takes
- precedence. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.8. cgi ΓòÉΓòÉΓòÉ
-
- The cgi and hcgi terminal drivers support SCO CGI drivers. hcgi is for
- printers; the environment variable CGIPRNT must be set. cgi may be used for
- either a display or hardcopy; if the environment variable CGIDISP is set, then
- that display is used. Otherwise CGIPRNT is used.
-
- These terminals have no options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.9. cgm ΓòÉΓòÉΓòÉ
-
- The cgm terminal generates a Computer Graphics Metafile. This file format is a
- subset of the ANSI X3.122-1986 standard entitled "Computer Graphics - Metafile
- for the Storage and Transfer of Picture Description Information". Several
- options may be set in cgm.
-
- Syntax:
-
- set terminal cgm {<mode>} {<color>} {<rotation>} {solid | dashed}
- {width <plot_width>} {linewidth <line_width>}
- {"<font>"} {<fontsize>}
-
- where <mode> is landscape, portrait, or default; <color> is either color or
- monochrome; <rotation> is either rotate or norotate; solid draws all curves
- with solid lines, overriding any dashed patterns; <plot_width> is the width of
- the page in points; <line_width> is the line width in points; <font> is the
- name of a font; and <fontsize> is the size of the font in points.
-
- By default, cgm uses rotated text for the Y axis label.
-
- The first six options can be in any order. Selecting default sets all options
- to their default values.
-
- Examples:
-
- set terminal cgm landscape color rotate dashed width 432 \
- linewidth 1 'Arial Bold' 12 # defaults
- set terminal cgm 14 linewidth 2 14 # wider lines & larger font
- set terminal cgm portrait 'Times Roman Italic' 12
- set terminal cgm color solid # no pesky dashes!
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.9.1. font ΓòÉΓòÉΓòÉ
-
- The first part of a Computer Graphics Metafile, the metafile description,
- includes a font table. In the picture body, a font is designated by an index
- into this table. By default, this terminal generates a table with the
- following fonts:
-
- Arial
- Arial Italic
- Arial Bold
- Arial Bold Italic
- Times Roman
- Times Roman Italic
- Times Roman Bold
- Times Roman Bold Italic
- Helvetica
- Roman
-
- Case is not distinct, but the modifiers must appear in the above order (that
- is, not 'Arial Italic Bold'). 'Arial Bold' is the default font.
-
- You may also specify a font name which does not appear in the default font
- table. In that case, a new font table is constructed with the specified font
- as its only entry. You must ensure that the spelling, capitalization, and
- spacing of the name are appropriate for the application that will read the CGM
- file. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.9.2. fontsize ΓòÉΓòÉΓòÉ
-
- Fonts are scaled assuming the page is 6 inches wide. If the size command is
- used to change the aspect ratio of the page or the CGM file is converted to a
- different width (e.g. it is imported into a document in which the margins are
- not 6 inches apart), the resulting font sizes will be different. To change the
- assumed width, use the width option. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.9.3. linewidth ΓòÉΓòÉΓòÉ
-
- The linewidth option sets the width of lines in pt. The default width is 1 pt.
- Scaling is affected by the actual width of the page, as discussed under the
- fontsize and width options Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.9.4. rotate ΓòÉΓòÉΓòÉ
-
- The norotate option may be used to disable text rotation. For example, the CGM
- input filter for Word for Windows 6.0c can accept rotated text, but the DRAW
- editor within Word cannot. If you edit a graph (for example, to label a
- curve), all rotated text is restored to horizontal. The Y axis label will then
- extend beyond the clip boundary. With norotate, the Y axis label starts in a
- less attractive location, but the page can be edited without damage. The
- rotate option confirms the default behavior. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.9.5. solid ΓòÉΓòÉΓòÉ
-
- The solid option may be used to disable dashed line styles in the plots. This
- is useful when color is enabled and the dashing of the lines detracts from the
- appearance of the plot. The dashed option confirms the default behavior, which
- gives a different dash pattern to each curve. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.9.6. size ΓòÉΓòÉΓòÉ
-
- Default size of a CGM page is 32599 units wide and 23457 units high for
- landscape, or 23457 units wide by 32599 units high for portrait. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.9.7. width ΓòÉΓòÉΓòÉ
-
- All distances in the CGM file are in abstract units. The application that
- reads the file determines the size of the final page. By default, the width of
- the final page is assumed to be 6 inches (15.24 cm). This distance is used to
- calculate the correct font size, and may be changed with the width option. The
- keyword should be followed by the width in points. (Here, a point is 1/72
- inch, as in PostScript. This unit is known as a "big point" in TeX.) gnuplot
- arithmetic can be used to convert from other units, as follows:
-
- set terminal cgm width 432 # default
- set terminal cgm width 6*72 # same as above
- set terminal cgm width 10/2.54*72 # 10 cm wide
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.9.8. winword6 ΓòÉΓòÉΓòÉ
-
- The default font table was chosen to match, where possible, the default font
- assignments made by the Computer Graphics Metafile input filter for Microsoft
- Word 6.0c, although the filter makes available only 'Arial' and 'Times Roman'
- fonts and their bold and/or italic variants. Other fonts such as 'Helvetica'
- and 'Roman' are not available. If the CGM file includes a font table, the
- filter mostly ignores it. However, it changes certain font assignments so that
- they disagree with the table. As a workaround, the winword6 option deletes the
- font table from the CGM file. In this case, the filter makes predictable font
- assignments. 'Arial Bold' is correctly assigned even with the font table
- present, which is one reason it was chosen as the default.
-
- winword6 disables the color tables for a similar reason---with the color table
- included, Microsoft Word displays black for color 7.
-
- Linewidths and pointsizes may be changed with set linestyle. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.10. corel ΓòÉΓòÉΓòÉ
-
- The corel terminal driver supports CorelDraw.
-
- Syntax:
-
- set terminal corel { default
- | {monochrome | color
- {<fontname> {"<fontsize>"
- {<xsize> <ysize> {<linewidth> }}}}}
-
- where the fontsize and linewidth are specified in points and the sizes in
- inches. The defaults are monochrome, "SwitzerlandLight", 22, 8.2, 10 and 1.2.
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.11. debug ΓòÉΓòÉΓòÉ
-
- This terminal is provided to allow for the debugging of gnuplot. It is likely
- to be of use only for users who are modifying the source code. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.12. svga ΓòÉΓòÉΓòÉ
-
- The svga terminal driver supports PCs with SVGA graphics. It can only be be
- used if it is compiled with DJGPP. Its only option is the font.
-
- Syntax:
-
- set terminal svga {"<fontname>"}
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.13. dumb ΓòÉΓòÉΓòÉ
-
- The dumb terminal driver has an optional size specification and trailing
- linefeed control.
-
- Syntax:
-
- set terminal dumb {[no]feed} {<xsize> <ysize>}
-
- where <xsize> and <ysize> set the size of the dumb terminals. Default is 79 by
- 24. The last newline is printed only if feed is enabled.
-
- Examples:
-
- set term dumb nofeed
- set term dumb 79 49 # VGA screen---why would anyone do that?
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.14. dxf ΓòÉΓòÉΓòÉ
-
- The dxf terminal driver creates pictures that can be imported into AutoCad
- (Release 10.x). It has no options of its own, but some features of its plots
- may be modified by other means. The default size is 120x80 AutoCad units,
- which can be changed by set size. dxf uses seven colors (white, red, yellow,
- green, cyan, blue and magenta), which can be changed only by modifying the
- source file. If a black-and-white plotting device is used, the colors are
- mapped to differing line thicknesses. See the description of the AutoCad
- print/plot command. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.15. dxy800a ΓòÉΓòÉΓòÉ
-
- This terminal driver supports the Roland DXY800A plotter. It has no options.
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.16. eepic ΓòÉΓòÉΓòÉ
-
- The eepic terminal driver supports the extended LaTeX picture environment. It
- is an alternative to the latex driver.
-
- The output of this terminal is intended for use with the "eepic.sty" macro
- package for LaTeX. To use it, you need "eepic.sty", "epic.sty" and a printer
- driver that supports the "tpic" \specials. If your printer driver doesn't
- support those \specials, "eepicemu.sty" will enable you to use some of them.
-
- Although dotted and dashed lines are possible with eepic and are tempting,
- they do not work well for high-sample-rate curves, fusing the dashes all
- together into a solid line. For now, the eepic driver creates only solid
- lines. There is another gnuplot driver (tpic) that supports dashed lines, but
- it cannot be used if your DVI driver doesn't support "tpic" \specials.
-
- All drivers for LaTeX offer a special way of controlling text positioning: If
- any text string begins with '{', you also need to include a '}' at the end of
- the text, and the whole text will be centered both horizontally and vertically
- by LaTeX. --- If the text string begins with '[', you need to continue it with:
- a position specification (up to two out of t,b,l,r), ']{', the text itself, and
- finally, '}'. The text itself may be anything LaTeX can typeset as an LR-box.
- \rule{}{}'s may help for best positioning.
-
- The eepic terminal has no options.
-
- Examples: About label positioning: Use gnuplot defaults (mostly sensible, but
- sometimes not really best):
-
- set title '\LaTeX\ -- $ \gamma $'
-
- Force centering both horizontally and vertically:
-
- set label '{\LaTeX\ -- $ \gamma $}' at 0,0
-
- Specify own positioning (top here):
-
- set xlabel '[t]{\LaTeX\ -- $ \gamma $}'
-
- The other label -- account for long ticlabels:
-
- set ylabel '[r]{\LaTeX\ -- $ \gamma $\rule{7mm}{0pt}'
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.17. emxvga ΓòÉΓòÉΓòÉ
-
- The emxvga, emxvesa and vgal terminal drivers support PCs with SVGA, vesa SVGA
- and VGA graphics boards, respectively. They are intended to be compiled with
- "emx-gcc" under either DOS or OS/2. They also need VESA and SVGAKIT maintained
- by Johannes Martin (JMARTIN@GOOFY.ZDV.UNI-MAINZ.DE) with additions by David J.
- Liu (liu@phri.nyu.edu).
-
- Syntax:
-
- set terminal emxvga
- set terminal emxvesa {vesa-mode}
- set terminal vgal
-
- The only option is the vesa mode for emxvesa, which defaults to G640x480x256.
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.18. epson-180dpi ΓòÉΓòÉΓòÉ
-
- This driver supports a family of Epson printers and derivatives.
-
- epson-180dpi and epson-60dpi are drivers for Epson LQ-style 24-pin printers
- with resolutions of 180 and 60 dots per inch, respectively.
-
- epson-lx800 is a generic 9-pin driver appropriate for printers like the Epson
- LX-800, the Star NL-10 and NX-1000, the PROPRINTER, and so forth.
-
- nec-cp6 is generix 24-pin driver that can be used for printers like the NEC
- CP6 and the Epson LQ-800.
-
- The okidata driver supports the 9-pin OKIDATA 320/321 Standard printers.
-
- The starc driver is for the Star Color Printer.
-
- The tandy-60dpi driver is for the Tandy DMP-130 series of 9-pin, 60-dpi printers.
-
- Only nec-cp6 has any options.
-
- Syntax:
-
- set terminal nec-cp6 {monochrome | colour | draft}
-
- which defaults to monochrome.
-
- With each of these drivers, a binary copy is required on a PC to print. Do
- not use print---use instead copy file /b lpt1:. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.19. excl ΓòÉΓòÉΓòÉ
-
- The excl terminal driver supports Talaris printers such as the EXCL Laser
- printer and the 1590. It has no options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.20. hercules ΓòÉΓòÉΓòÉ
-
- These drivers supports PC monitors with autodetected graphics boards. They can
- be used only when compiled with Zortech C/C++. None have options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.21. fig ΓòÉΓòÉΓòÉ
-
- The fig terminal device generates output in the Fig graphics language.
-
- Syntax:
-
- set terminal fig {monochrome | color} {small | big}
- {pointsmax <max_points>}
- {landscape | portrait}
- {metric | inches}
- {fontsize <fsize>}
- {size <xsize> <ysize>}
- {thickness <units>}
- {depth <layer>}
-
- monochrome and color determine whether the picture is black-and-white or color.
- small and big produce a 5x3 or 8x5 inch graph in the default landscape mode and
- 3x5 or 5x8 inches in portrait mode. <max_points> sets the maximum number of
- points per polyline. Default units for editing with "xfig" may be metric or
- inches. fontsize sets the size of the text font to <fsize> points. size sets
- (overrides) the size of the drawing area to <xsize>*<ysize> in units of inches
- or centimeters depending on the inches or metric setting in effect. depth sets
- the default depth layer for all lines and text. The default depth is 10 to
- leave room for adding material with "xfig" on top of the plot.
-
- thickness sets the default line thickness, which is 1 if not specified.
- Overriding the thickness can be achieved by adding a multiple of 100 to the to
- the linetype value for a plot command. In a similar way the depth of plot
- elements (with respect to the default depth) can be controlled by adding a
- multiple of 1000 to <linetype>. The depth is then <layer> + <linetype>/1000
- and the thickness is (<linetype>%1000)/100 or, if that is zero, the default
- line thickness.
-
- Additional point-plot symbols are also available with the fig driver. The
- symbols can be used through pointtype values % 100 above 50, with different
- fill intensities controlled by <pointtype> % 5 and outlines in black (for
- <pointtype> % 10 < 5) or in the current color. Available symbols are
-
- 50 - 59: circles
- 60 - 69: squares
- 70 - 79: diamonds
- 80 - 89: upwards triangles
- 90 - 99: downwards triangles
-
- The size of these symbols is linked to the font size. The depth of symbols is
- by default one less than the depth for lines to achieve nice error bars. If
- <pointtype> is above 1000, the depth is <layer> + <pointtype>/1000-1. If
- <pointtype>%1000 is above 100, the fill color is (<pointtype>%1000)/100-1.
-
- Available fill colors are (from 1 to 9): black, blue, green, cyan, red,
- magenta, yellow, white and dark blue (in monochrome mode: black for 1 to 6 and
- white for 7 to 9).
-
- See plot with for details of <linetype> and <pointtype>.
-
- The big option is a substitute for the bfig terminal in earlier versions,
- which is no longer supported.
-
- Examples:
-
- set terminal fig monochrome small pointsmax 1000 # defaults
-
- plot 'file.dat' with points linetype 102 pointtype 759
-
- would produce circles with a blue outline of width 1 and yellow fill color.
-
- plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 554
-
- would produce errorbars with black lines and circles filled red. These circles
- are one layer above the lines (at depth 9 by default).
-
- To plot the error bars on top of the circles use
-
- plot 'file.dat' using 1:2:3 with err linetype 1 pointtype 2554
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.22. gif ΓòÉΓòÉΓòÉ
-
- The gif terminal driver generates output in GIF format. It uses Thomas
- Boutell's gd library, which is available from http://www.boutell.com/gd/
-
- Syntax:
-
- set terminal gif {transparent} {interlace}
- {small | medium | large}
- {size <x>,<y>}
- {<color0> <color1> <color2> ...}
-
- transparent instructs the driver to generate transparent GIFs. The first color
- will be the transparent one.
-
- interlace instructs the driver to generate interlaced GIFs.
-
- The choice of fonts is small (6x12 pixels), medium (7x13 Bold) or large (8x16).
-
- The size <x,y> is given in pixels---it defaults to 640x480. The number of
- pixels can be also modified by scaling with the set size command.
-
- Each color must be of the form 'xrrggbb', where x is the literal character 'x'
- and 'rrggbb' are the red, green and blue components in hex. For example,
- 'x00ff00' is green. The background color is set first, then the border colors,
- then the X & Y axis colors, then the plotting colors. The maximum number of
- colors that can be set is 256.
-
- Examples:
-
- set terminal gif small size 640,480 \
- xffffff x000000 x404040 \
- xff0000 xffa500 x66cdaa xcdb5cd \
- xadd8e6 x0000ff xdda0dd x9500d3 # defaults
-
- which uses white for the non-transparent background, black for borders, gray
- for the axes, and red, orange, medium aquamarine, thistle 3, light blue, blue,
- plum and dark violet for eight plotting colors.
-
- set terminal gif transparent xffffff \
- x000000 x202020 x404040 x606060 \
- x808080 xA0A0A0 xC0C0C0 xE0E0E0 \
-
- which uses white for the transparent background, black for borders, dark gray
- for axes, and a gray-scale for the six plotting colors.
-
- The page size is 640x480 pixels. The gif driver can create either color or
- monochromatic output, but you have no control over which is produced.
-
- The current version of the gif driver does not support animated GIFs. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.23. unixplot ΓòÉΓòÉΓòÉ
-
- The unixplot driver produces device-independent output in the GNU plot graphics
- language. The default size of the PostScript results generated by "plot2ps" is
- 5 x 3 inches; this can be increased up to about 8.25 x 8.25 by set size.
-
- Syntax:
-
- set terminal unixplot {"<fontname>"} {<fontsize>}
-
- which defaults to 10-point "Courier".
-
- There is a non-GNU version of the unixplot driver which cannot be compiled
- unless this version is left out. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.24. gpic ΓòÉΓòÉΓòÉ
-
- The gpic terminal driver generates GPIC graphs in the Free Software
- Foundations's "groff" package. The default size is 5 x 3 inches. The only
- option is the origin, which defaults to (0,0).
-
- Syntax:
-
- set terminal gpic {<x> <y>}
-
- where x and y are in inches.
-
- A simple graph can be formatted using
-
- groff -p -mpic -Tps file.pic > file.ps.
-
- The output from pic can be pipe-lined into eqn, so it is possible to put
- complex functions in a graph with the set label and set {x/y}label commands.
- For instance,
-
- set ylab '@space 0 int from 0 to x alpha ( t ) roman d t@'
-
- will label the y axis with a nice integral if formatted with the command:
-
- gpic filename.pic | geqn -d@@ -Tps | groff -m[macro-package] -Tps
- > filename.ps
-
- Figures made this way can be scaled to fit into a document. The pic language
- is easy to understand, so the graphs can be edited by hand if need be. All
- co-ordinates in the pic-file produced by gnuplot are given as x+gnuplotx and
- y+gnuploty. By default x and y are given the value 0. If this line is removed
- with an editor in a number of files, one can put several graphs in one figure
- like this (default size is 5.0x3.0 inches):
-
- .PS 8.0
- x=0;y=3
- copy "figa.pic"
- x=5;y=3
- copy "figb.pic"
- x=0;y=0
- copy "figc.pic"
- x=5;y=0
- copy "figd.pic"
- .PE
-
- This will produce an 8-inch-wide figure with four graphs in two rows on top of
- each other.
-
- One can also achieve the same thing by the command
-
- set terminal gpic x y
-
- for example, using
-
- .PS 6.0
- copy "trig.pic"
- .PE
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.25. gpr ΓòÉΓòÉΓòÉ
-
- The gpr terminal driver supports the Apollo Graphics Primitive Resource for a
- fixed-size window. It has no options.
-
- If a variable window size is desired, use the apollo terminal instead. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.26. grass ΓòÉΓòÉΓòÉ
-
- The grass terminal driver gives gnuplot capabilities to users of the GRASS
- geographic information system. Contact grassp-list@moon.cecer.army.mil for
- more information. Pages are written to the current frame of the GRASS Graphics
- Window. There are no options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.27. hp2623a ΓòÉΓòÉΓòÉ
-
- The hp2623a terminal driver supports the Hewlett Packard HP2623A. It has no
- options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.28. hp2648 ΓòÉΓòÉΓòÉ
-
- The hp2648 terminal driver supports the Hewlett Packard HP2647 and HP2648. It
- has no options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.29. hp500c ΓòÉΓòÉΓòÉ
-
- The hp500c terminal driver supports the Hewlett Packard HP DeskJet 500c. It has
- options for resolution and compression.
-
- Syntax:
-
- set terminal hp500c {<res>} {<comp>}
-
- where res can be 75, 100, 150 or 300 dots per inch and comp can be "rle", or
- "tiff". Any other inputs are replaced by the defaults, which are 75 dpi and no
- compression. Rasterization at the higher resolutions may require a large
- amount of memory. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.30. hpgl ΓòÉΓòÉΓòÉ
-
- The hpgl driver produces HPGL output for devices like the HP7475A plotter.
- There are two options which can be set---the number of pens and "eject", which
- tells the plotter to eject a page when done. The default is to use 6 pens and
- not to eject the page when done.
-
- The international character sets ISO-8859-1 and CP850 are recognized via set
- encoding iso_8859_1 or set encoding cp850 (see set encoding for details).
-
- Syntax:
-
- set terminal hpgl {<number_of_pens>} {eject}
-
- The selection
-
- set terminal hpgl 8 eject
-
- is equivalent to the previous hp7550 terminal, and the selection
-
- set terminal hpgl 4
-
- is equivalent to the previous hp7580b terminal.
-
- The pcl5 driver supports the Hewlett-Packard Laserjet III. It actually uses
- HPGL-2, but there is a name conflict among the terminal devices. It has
- several options
-
- Syntax:
-
- set terminal pcl5 {<mode>} {<font>} {<fontsize>}
-
- where <mode> is landscape, or portrait, <font> is stick, univers, or cg_times,
- and <fontsize> is the size in points.
-
- With pcl5 international characters are handled by the printer; you just put
- the appropriate 8-bit character codes into the text strings. You don't need to
- bother with set encoding.
-
- HPGL graphics can be imported by many software packages. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.31. hpljii ΓòÉΓòÉΓòÉ
-
- The hpljii terminal driver supports the HP Laserjet Series II printer. The
- hpdj driver supports the HP DeskJet 500 printer. These drivers allow a choice
- of resolutions.
-
- Syntax:
-
- set terminal hpljii | hpdj {<res>}
-
- where res may be 75, 100, 150 or 300 dots per inch; the default is 75.
- Rasterization at the higher resolutions may require a large amount of memory.
-
- The hp500c terminal is similar to hpdj; hp500c additionally supports color and
- compression. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.32. hppj ΓòÉΓòÉΓòÉ
-
- The hppj terminal driver supports the HP PaintJet and HP3630 printers. The
- only option is the choice of font.
-
- Syntax:
-
- set terminal hppj {FNT5X9 | FNT9X17 | FNT13X25}
-
- with the middle-sized font (FNT9X17) being the default. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.33. imagen ΓòÉΓòÉΓòÉ
-
- The imagen terminal driver supports Imagen laser printers. It is capable of
- placing multiple graphs on a single page.
-
- Syntax:
-
- set terminal imagen {<fontsize>} {portrait | landscape}
- {[<horiz>,<vert>]}
-
- where fontsize defaults to 12 points and the layout defaults to landscape.
- <horiz> and <vert> are the number of graphs in the horizontal and vertical
- directions; these default to unity.
-
- Example:
-
- set terminal imagen portrait [2,3]
-
- puts six graphs on the page in three rows of two in portrait orientation. Go
- Up
-
-
- ΓòÉΓòÉΓòÉ 3.34. iris4d ΓòÉΓòÉΓòÉ
-
- The iris4d terminal driver supports Silicon Graphics IRIS 4D computers. Its
- only option is 8- or 24-bit color depth. The default is 8.
-
- Syntax:
-
- set terminal iris4d {8 | 24}
-
- The color depth is not really a choice -- the value appropriate for the
- hardware should be selected.
-
- When using 24-bit mode, the colors can be directly specified via the file
- .gnuplot_iris4d that is searched in the current directory and then in the home
- directory specified by the HOME environment variable. This file holds RGB
- values for the background, border, labels and nine plotting colors, in that
- order. For example, here is a file containing the default colors:
-
- 85 85 85 Background (dark gray)
- 0 0 0 Boundary (black)
- 170 0 170 Labeling (magenta)
- 85 255 255 Plot Color 1 (light cyan)
- 170 0 0 Plot Color 2 (red)
- 0 170 0 Plot Color 3 (green)
- 255 85 255 Plot Color 4 (light magenta)
- 255 255 85 Plot Color 5 (yellow)
- 255 85 85 Plot Color 6 (light red)
- 85 255 85 Plot Color 7 (light green)
- 0 170 170 Plot Color 8 (cyan)
- 170 170 0 Plot Color 9 (brown)
-
- This file must have exactly 12 lines of RGB triples. No empty lines are
- allowed, and anything after the third number on a line is ignored. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.35. kyo ΓòÉΓòÉΓòÉ
-
- The kyo and prescribe terminal drivers support the Kyocera laser printer. The
- only difference between the two is that kyo uses "Helvetica" whereas prescribe
- uses "Courier". There are no options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.36. latex ΓòÉΓòÉΓòÉ
-
- The latex and emtex drivers allow two options.
-
- Syntax:
-
- set terminal latex | emtex {courier | roman} {<fontsize>}
-
- fontsize may be any size you specify. The default is 10-point Roman.
-
- Unless your driver is capable of building fonts at any size (e.g. dvips),
- stick to the standard 10, 11 and 12 point sizes.
-
- METAFONT users beware: METAFONT does not like odd sizes.
-
- All drivers for LaTeX offer a special way of controlling text positioning: If
- any text string begins with '{', you also need to include a '}' at the end of
- the text, and the whole text will be centered both horizontally and vertically
- by LaTeX. --- If the text string begins with '[', you need to continue it with:
- a position specification (up to two out of t,b,l,r), ']{', the text itself, and
- finally, '}'. The text itself may be anything LaTeX can typeset as an LR-box.
- \rule{}{}'s may help for best positioning.
-
- Examples: About label positioning: Use gnuplot defaults (mostly sensible, but
- sometimes not really best):
-
- set title '\LaTeX\ -- $ \gamma $'
-
- Force centering both horizontally and vertically:
-
- set label '{\LaTeX\ -- $ \gamma $}' at 0,0
-
- Specify own positioning (top here):
-
- set xlabel '[t]{\LaTeX\ -- $ \gamma $}'
-
- The other label -- account for long ticlabels:
-
- set ylabel '[r]{\LaTeX\ -- $ \gamma $\rule{7mm}{0pt}'
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.37. linux ΓòÉΓòÉΓòÉ
-
- The linux driver has no additional options to specify. It looks at the
- environment variable GSVGAMODE for the default mode; if not set, it uses
- 1024x768x256 as default mode or, if that is not possible, 640x480x16 (standard
- VGA). Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.38. macintosh ΓòÉΓòÉΓòÉ
-
- Several options may be set in the 'macintosh' driver.
-
- Syntax:
-
- set terminal macintosh {singlewin | multiwin} {vertical | novertical} {size <width>, <height> | default}
-
- 'singlewin' limits the output to a single window and is useful for animations.
- 'multiwin' allows multiple windows. 'vertical' is only valid under the gx
- option. With this option, rotated text
-
- be drawn vertically. novertical turns this option off.
- size <width>, <height> overrides the graph size set in the preferences
- dialog until it is cleared with either 'set term mac size default'
- or 'set term mac default'.
-
- 'set term mac size default' sets the window size settings to those set in
- the preferences dialog.
-
- 'set term mac default' sets all options to their default values.
- Default values: nogx, multiwin, novertical.
-
- If you generate graphs under the multiwin option and then switch to singlewin,
- the next plot command will cause one more window to be created. This new
- window will be reused as long as singlewin is in effect. If you switch back
- to multiwin, generate some graphs, and then switch to singlewin again, the
- orginal 'singlewin' window will be resused if it is still open. Otherwise
- a new 'singlewin' window will be created. The 'singlewin' window is not numbered.
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.39. mf ΓòÉΓòÉΓòÉ
-
- The mf terminal driver creates a input file to the METAFONT program. Thus a
- figure may be used in the TeX document in the same way as is a character.
-
- To use a picture in a document, the METAFONT program must be run with the
- output file from gnuplot as input. Thus, the user needs a basic knowledge of
- the font creating process and the procedure for including a new font in a
- document. However, if the METAFONT program is set up properly at the local
- site, an unexperienced user could perform the operation without much trouble.
-
- The text support is based on a METAFONT character set. Currently the Computer
- Modern Roman font set is input, but the user is in principal free to chose
- whatever fonts he or she needs. The METAFONT source files for the chosen font
- must be available. Each character is stored in a separate picture variable in
- METAFONT. These variables may be manipulated (rotated, scaled etc.) when
- characters are needed. The drawback is the interpretation time in the METAFONT
- program. On some machines (i.e. PC) the limited amount of memory available may
- also cause problems if too many pictures are stored.
-
- The mf terminal has no options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.39.1. METAFONT Instructions ΓòÉΓòÉΓòÉ
-
- - Set your terminal to METAFONT:
-
- set terminal mf
-
- - Select an output-file, e.g.:
-
- set output "myfigures.mf"
-
- - Create your pictures. Each picture will generate a separate character. Its
- default size will be 5*3 inches. You can change the size by saying set size
- 0.5,0.5 or whatever fraction of the default size you want to have.
-
- - Quit gnuplot.
-
- - Generate a TFM and GF file by running METAFONT on the output of gnuplot.
- Since the picture is quite large (5*3 in), you will have to use a version of
- METAFONT that has a value of at least 150000 for memmax. On Unix systems these
- are conventionally installed under the name bigmf. For the following assume
- that the command virmf stands for a big version of METAFONT. For example:
-
- - Invoke METAFONT:
-
- virmf '&plain'
-
- - Select the output device: At the METAFONT prompt ('*') type:
-
- \mode:=CanonCX; % or whatever printer you use
-
- - Optionally select a magnification:
-
- mag:=1; % or whatever you wish
-
- - Input the gnuplot-file:
-
- input myfigures.mf
-
- On a typical Unix machine there will usually be a script called "mf" that
- executes virmf '&plain', so you probably can substitute mf for virmf &plain.
- This will generate two files: mfput.tfm and mfput.$$$gf (where $$$ indicates
- the resolution of your device). The above can be conveniently achieved by
- typing everything on the command line, e.g.: virmf '&plain' '\mode:=CanonCX;
- mag:=1; input myfigures.mf' In this case the output files will be named
- myfigures.tfm and myfigures.300gf.
-
- - Generate a PK file from the GF file using gftopk:
-
- gftopk myfigures.300gf myfigures.300pk
-
- The name of the output file for gftopk depends on the DVI driver you use. Ask
- your local TeX administrator about the naming conventions. Next, either
- install the TFM and PK files in the appropriate directories, or set your
- environment variables properly. Usually this involves setting TEXFONTS to
- include the current directory and doing the same thing for the environment
- variable that your DVI driver uses (no standard name here...). This step is
- necessary so that TeX will find the font metric file and your DVI driver will
- find the PK file.
-
- - To include your pictures in your document you have to tell TeX the font:
-
- \font\gnufigs=myfigures
-
- Each picture you made is stored in a single character. The first picture is
- character 0, the second is character 1, and so on... After doing the above
- step, you can use the pictures just like any other characters. Therefore, to
- place pictures 1 and 2 centered in your document, all you have to do is:
-
- \centerline{\gnufigs\char0}
- \centerline{\gnufigs\char1}
-
- in plain TeX. For LaTeX you can, of course, use the picture environment and
- place the picture wherever you wish by using the \makebox and \put macros.
-
- This conversion saves you a lot of time once you have generated the font; TeX
- handles the pictures as characters and uses minimal time to place them, and the
- documents you make change more often than the pictures do. It also saves a lot
- of TeX memory. One last advantage of using the METAFONT driver is that the DVI
- file really remains device independent, because no \special commands are used
- as in the eepic and tpic drivers. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.40. mgr ΓòÉΓòÉΓòÉ
-
- The mgr terminal driver supports the Mgr Window system. It has no options. Go
- Up
-
-
- ΓòÉΓòÉΓòÉ 3.41. mif ΓòÉΓòÉΓòÉ
-
- The mif terminal driver produces Frame Maker MIF format version 3.00. It plots
- in MIF Frames with the size 15*10 cm, and plot primitives with the same pen
- will be grouped in the same MIF group. Plot primitives in a gnuplot page will
- be plotted in a MIF Frame, and several MIF Frames are collected in one large
- MIF Frame. The MIF font used for text is "Times".
-
- Several options may be set in the MIF 3.00 driver.
-
- Syntax:
-
- set terminal mif {colour | monochrome} {polyline | vectors}
- {help | ?}
-
- colour plots lines with line types >= 0 in colour (MIF sep. 2--7) and
- monochrome plots all line types in black (MIF sep. 0). polyline plots curves as
- continuous curves and vectors plots curves as collections of vectors. help and
- ? print online help on standard error output---both print a short description
- of the usage; help also lists the options;
-
- Examples:
-
- set term mif colour polylines # defaults
- set term mif # defaults
- set term mif vectors
- set term mif help
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.42. mtos ΓòÉΓòÉΓòÉ
-
- The mtos terminal has no options. It sends data via a pipe to an external
- program called GPCLIENT. It runs under MULTITOS, Magic 3.x, MagicMAC. and
- MiNT. If you cannot find GPCLIENT, than mail to dirk@lstm.uni-erlangen.de. Go
- Up
-
-
- ΓòÉΓòÉΓòÉ 3.43. next ΓòÉΓòÉΓòÉ
-
- Several options may be set in the next driver.
-
- Syntax:
-
- set terminal next {<mode>} {<type> } {<color>} {<dashed>}
- {"<fontname>"} {<fontsize>} title {"<newtitle>"}
-
- where <mode> is default, which sets all options to their defaults; <type> is
- either new or old, where old invokes the old single window; <color> is either
- color or monochrome; <dashed> is either solid or dashed; "<fontname>" is the
- name of a valid PostScript font; <fontsize> is the size of the font in
- PostScript points; and <title> is the title for the GnuTerm window. Defaults
- are new, monochrome, dashed, "Helvetica", 14pt.
-
- Examples:
-
- set term next default
- set term next 22
- set term next color "Times-Roman" 14
- set term next color "Helvetica" 12 title "MyPlot"
- set term next old
-
- Pointsizes may be changed with set linestyle. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.44. pbm ΓòÉΓòÉΓòÉ
-
- Several options may be set in the pbm terminal---the driver for PBMplus.
-
- Syntax:
-
- set terminal pbm {<fontsize>} {<mode>}
-
- where <fontsize> is small, medium, or large and <mode> is monochrome, gray or
- color. The default plot size is 640 pixels wide and 480 pixels high; this may
- be changed by set size.
-
- The output of the pbm driver depends upon <mode>: monochrome produces a
- portable bitmap (one bit per pixel), gray a portable graymap (three bits per
- pixel) and color a portable pixmap (color, four bits per pixel).
-
- The output of this driver can be used with Jef Poskanzer's excellent PBMPLUS
- package, which provides programs to convert the above PBMPLUS formats to GIF,
- TIFF, MacPaint, Macintosh PICT, PCX, X11 bitmap and many others. PBMPLUS may
- be obtained from ftp.x.org. The relevant files have names that begin with
- "netpbm-1mar1994.p1"; they reside in /contrib/utilities. The package can
- probably also be obtained from one of the many sites that mirrors ftp.x.org.
-
- Examples:
-
- set terminal pbm small monochrome # defaults
- set size 2,2; set terminal pbm color medium
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.45. dospc ΓòÉΓòÉΓòÉ
-
- The dospc terminal driver supports PCs with arbitrary graphics boards, which
- will be automatically detected. It should be used only if you are not using
- the gcc or Zortec C/C++ compilers. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.46. pm ΓòÉΓòÉΓòÉ
-
- The pm terminal driver provides an OS/2 Presentation Manager window in which
- the graph is plotted. The window is opened when the first graph is plotted.
- This window has its own online help as well as facilities for printing, copying
- to the clipboard and some line type and color adjustments. The multiplot option
- is supported.
-
- Syntax:
-
- set terminal pm {server {n}} {persist} {widelines} {enhanced} {"title"}
-
- If persist is specified, each graph appears in its own window and all windows
- remain open after gnuplot exits. If server is specified, all graphs appear in
- the same window, which remains open when gnuplot exits. This option takes an
- optional numerical argument which specifies an instance of the server process.
- Thus multiple server windows can be in use at the same time.
-
- If widelines is specified, all plots will be drawn with wide lines. If
- enhanced is specified, sub- and superscripts and multiple fonts are enabled
- using the same syntax as the enhanced postscript option (see set terminal
- postscript enhanced for details). Font names for the basic PostScript fonts
- may be abbreviated to single letters.
-
- If title is specified, it will be used as the title of the plot window. It
- will also be used as the name of the server instance, and will override the
- optional numerical argument.
-
- Linewidths may be changed with set linestyle. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.47. png ΓòÉΓòÉΓòÉ
-
- The png terminal driver supports Portable Network Graphics. To compile it, you
- will need the third-party libraries "libpng" and "zlib"; both are available at
- ftp://ftp.uu.net/graphics/png. png has two options.
-
- Syntax:
-
- set terminal png {small | medium | large}
- {monochrome | gray | color}
-
- The defaults are small (fontsize) and monochrome. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.48. postscript ΓòÉΓòÉΓòÉ
-
- Several options may be set in the postscript driver.
-
- Syntax:
-
- set terminal postscript {<mode>} {enhanced | noenhanced}
- {color | monochrome} {solid | dashed}
- {<duplexing>}
- {"<fontname>"} {<fontsize>}
-
- where <mode> is landscape, portrait, eps or default; solid draws all plots with
- solid lines, overriding any dashed patterns; <duplexing> is defaultplex,
- simplex or duplex ("duplexing" in PostScript is the ability of the printer to
- print on both sides of the same page---don't set this if your printer can't do
- it); enhanced activates the "enhanced PostScript" features (subscripts,
- superscripts and mixed fonts); "<fontname"> is the name of a valid PostScript
- font; and <fontsize> is the size of the font in PostScript points.
-
- default mode sets all options to their defaults: landscape, monochrome,
- dashed, defaultplex, noenhanced, "Helvetica" and 14pt.
-
- Default size of a PostScript plot is 10 inches wide and 7 inches high.
-
- eps mode generates EPS (Encapsulated PostScript) output, which is just regular
- PostScript with some additional lines that allow the file to be imported into a
- variety of other applications. (The added lines are PostScript comment lines,
- so the file may still be printed by itself.) To get EPS output, use the eps
- mode and make only one plot per file. In eps mode the whole plot, including
- the fonts, is reduced to half of the default size.
-
- Examples:
-
- set terminal postscript default # old postscript
- set terminal postscript enhanced # old enhpost
- set terminal postscript landscape 22 # old psbig
- set terminal postscript eps 14 # old epsf1
- set terminal postscript eps 22 # old epsf2
- set size 0.7,1.4; set term post portrait color "Times-Roman" 14
-
- Linewidths and pointsizes may be changed with set linestyle.
-
- The postscript driver supports about 70 distinct pointtypes, selectable
- through the pointtype option on plot and set linestyle.
-
- Several possibly useful files about gnuplot's PostScript are included in the
- /docs/ps subdirectory of the gnuplot distribution and at the distribution
- sites. These are "ps_symbols.gpi" (a gnuplot command file that, when executed,
- creates the file "ps_symbols.ps" which shows all the symbols available through
- the postscript terminal), "ps_guide.ps" (a PostScript file that contains a
- summary of the enhanced syntax and a page showing what the octal codes produce
- with text and symbol fonts) and "ps_file.doc" (a text file that contains a
- discussion of the organization of a PostScript file written by gnuplot).
-
- A PostScript file is editable, so once gnuplot has created one, you are free
- to modify it to your heart's desire. See the "editing postscript" section for
- some hints. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.48.1. enhanced postscript ΓòÉΓòÉΓòÉ
-
- Control Examples Explanation
- ^ a^x superscript
- _ a_x subscript
- @ @x or a@^b_c phantom box (occupies no width)
- & &{space} inserts space of specified length
-
- Braces can be used to place multiple-character text where a single character is
- expected (e.g., 2^{10}). To change the font and/or size, use the full form:
- {/[fontname][=fontsize | *fontscale] text}. Thus {/Symbol=20 G} is a 20-point
- GAMMA) and {/*0.75 K} is a K at three-quarters of whatever fontsize is
- currently in effect. (The '/' character MUST be the first character after the '{'.)
-
- If the encoding vector has been changed by set encoding, the default encoding
- vector can be used instead by following the slash with a dash. This is
- unnecessary if you use the Symbol font, however---since /Symbol uses its own
- encoding vector, gnuplot will not apply any other encoding vector to it.
-
- The phantom box is useful for a@^b_c to align superscripts and subscripts but
- does not work well for overwriting an accent on a letter. (To do the latter,
- it is much better to use set encoding iso_8859_1 to change to the ISO Latin-1
- encoding vector, which contains a large variety of letters with accents or
- other diacritical marks.) Since the box is non-spacing, it is sensible to put
- the shorter of the subscript or superscript in the box (that is, after the @).
-
- Space equal in length to a string can be inserted using the '&' character.
- Thus
-
- 'abc&{def}ghi'
-
- would produce
-
- 'abc ghi'.
-
- You can access special symbols numerically by specifying \character-code (in
- octal), e.g., {/Symbol \245} is the symbol for infinity.
-
- You can escape control characters using \, e.g., \\, \{, and so on.
-
- But be aware that strings in double-quotes are parsed differently than those
- enclosed in single-quotes. The major difference is that backslashes may need
- to be doubled when in double-quoted strings.
-
- Examples (these are hard to describe in words---try them!):
-
- set xlabel 'Time (10^6 {/Symbol m}s)'
- set title '{/Symbol=18 \362@_{/=9.6 0}^{/=12 x}} \
- {/Helvetica e^{-{/Symbol m}^2/2} d}{/Symbol m}'
-
- The file "ps_guide.ps" in the /docs/ps subdirectory of the gnuplot source
- distribution contains more examples of the enhanced syntax. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.48.2. editing postscript ΓòÉΓòÉΓòÉ
-
- The PostScript language is a very complex language---far too complex to
- describe in any detail in this document. Nevertheless there are some things in
- a PostScript file written by gnuplot that can be changed without risk of
- introducing fatal errors into the file.
-
- For example, the PostScript statement "/Color true def" (written into the file
- in response to the command set terminal postscript color), may be altered in an
- obvious way to generate a black-and-white version of a plot. Similarly line
- colors, text colors, line weights and symbol sizes can also be altered in
- straight-forward ways. Text (titles and labels) can be edited to correct
- misspellings or to change fonts. Anything can be repositioned, and of course
- anything can be added or deleted, but modifications such as these may require
- deeper knowledge of the PostScript language.
-
- The organization of a PostScript file written by gnuplot is discussed in the
- text file "ps_file.doc" in the /docs/ps subdirectory. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.49. pslatex and pstex ΓòÉΓòÉΓòÉ
-
- The pslatex and pstex drivers generate output for further processing by LaTeX
- and TeX, respectively. Figures generated by pstex can be included in any
- plain-based format (including LaTeX).
-
- Syntax:
-
- set terminal pslatex | |pstex {<color>} {<dashed>} {<rotate>}
- {auxfile} {<font_size>}
-
- <color> is either color or monochrome. <rotate> is either rotate or norotate
- and determines if the y-axis label is rotated. <font_size> is used to scale
- the font from its usual size.
-
- If auxfile is specified, it directs the driver to put the PostScript commands
- into an auxiliary file instead of directly into the LaTeX file. This is useful
- if your pictures are large enough that dvips cannot handle them. The name of
- the auxiliary PostScript file is derived from the name of the TeX file given on
- the set output command; it is determined by replacing the trailing .tex
- (actually just the final extent in the file name---and the option will be
- turned off if there is no extent) with .ps in the output file name. Remember
- to close the file before leaving gnuplot.
-
- All drivers for LaTeX offer a special way of controlling text positioning: If
- any text string begins with '{', you also need to include a '}' at the end of
- the text, and the whole text will be centered both horizontally and vertically
- by LaTeX. --- If the text string begins with '[', you need to continue it with:
- a position specification (up to two out of t,b,l,r), ']{', the text itself, and
- finally, '}'. The text itself may be anything LaTeX can typeset as an LR-box.
- \rule{}{}'s may help for best positioning.
-
- Examples:
-
- set term pslatex monochrome dashed rotate # set to defaults
-
- To write the PostScript commands into the file "foo.ps":
-
- set term pslatex auxfile
- set output "foo.tex"; plot ...: set output
-
- About label positioning: Use gnuplot defaults (mostly sensible, but sometimes
- not really best):
-
- set title '\LaTeX\ -- $ \gamma $'
-
- Force centering both horizontally and vertically:
-
- set label '{\LaTeX\ -- $ \gamma $}' at 0,0
-
- Specify own positioning (top here):
-
- set xlabel '[t]{\LaTeX\ -- $ \gamma $}'
-
- The other label -- account for long ticlabels:
-
- set ylabel '[r]{\LaTeX\ -- $ \gamma $\rule{7mm}{0pt}'
-
- Linewidths and pointsizes may be changed with set linestyle. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.50. pstricks ΓòÉΓòÉΓòÉ
-
- The pstricks driver is intended for use with the "pstricks.sty" macro package
- for LaTeX. It is an alternative to the eepic and latex drivers. You need
- "pstricks.sty", and, of course, a printer that understands PostScript, or a
- converter such as Ghostscript.
-
- PSTricks is available via anonymous ftp from the /pub directory at
- Princeton.EDU. This driver definitely does not come close to using the full
- capability of the PSTricks package.
-
- Syntax:
-
- set terminal pstricks {hacktext | nohacktext} {unit | nounit}
-
- The first option invokes an ugly hack that gives nicer numbers; the second has
- to do with plot scaling. The defaults are hacktext and nounit. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.51. qms ΓòÉΓòÉΓòÉ
-
- The qms terminal driver supports the QMS/QUIC Laser printer, the Talaris 1200
- and others. It has no options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.52. regis ΓòÉΓòÉΓòÉ
-
- The regis terminal device generates output in the REGIS graphics language. It
- has the option of using 4 (the default) or 16 colors.
-
- Syntax:
-
- set terminal regis {4 | 16}
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.53. rgip ΓòÉΓòÉΓòÉ
-
- The rgip and uniplex terminal drivers support RGIP metafiles. They can combine
- several graphs on a single page, but only one page is allowed in a given output file.
-
- Syntax:
-
- set terminal rgip | uniplex {portrait | landscape}
- {[<horiz>,<vert>]} {<fontsize>}
-
- permissible values for the font size are in the range 1--8, with the default
- being 1. The default layout is landscape. Graphs are placed on the page in a
- horizxvert grid, which defaults to [1,1].
-
- Example:
-
- set terminal uniplex portrait [2,3]
-
- puts six graphs on a page in three rows of two in portrait orientation. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.54. sun ΓòÉΓòÉΓòÉ
-
- The sun terminal driver supports the SunView window system. It has no options.
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.55. tek410x ΓòÉΓòÉΓòÉ
-
- The tek410x terminal driver supports the 410x and 420x family of Tektronix
- terminals. It has no options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.56. table ΓòÉΓòÉΓòÉ
-
- Instead of producing a graph, the table terminal prints out the points on which
- a graph would be based, i.e., the results of processing the plot or splot
- command, in a multicolumn ASCII table of X Y {Z} R values. The character R
- takes on one of three values: "i" if the point is in the active range, "o" if
- it is out-of-range, or "u" if it is undefined. The data format is determined
- by the format of the axis labels (see set format).
-
- For those times when you want the numbers, you can display them on the screen
- or save them to a file. This can be useful if you want to generate contours
- and then save them for further use, perhaps for plotting with plot; see set
- contour for an example. The same method can be used to save interpolated data
- (see set samples and set dgrid3d). Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.57. tek40 ΓòÉΓòÉΓòÉ
-
- This family of terminal drivers supports a variety of VT-like terminals.
- tek40xx supports Tektronix 4010 and others as well as most TEK emulators; vttek
- supports VT-like tek40xx terminal emulators; kc-tek40xx supports MS-DOS Kermit
- Tek4010 terminal emulators in color: km-tek40xx supports them in monochrome;
- selanar supports Selanar graphics; and bitgraph supports BBN Bitgraph
- terminals. None have any options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.58. texdraw ΓòÉΓòÉΓòÉ
-
- The texdraw terminal driver supports the LaTeX texdraw environment. It is
- intended for use with "texdraw.sty" and "texdraw.tex" in the texdraw package.
-
- It has no options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.59. tgif ΓòÉΓòÉΓòÉ
-
- Tgif is an X11-based drawing tool---it has nothing to do with GIF.
-
- The tgif driver supports different pointsizes (with set pointsize), different
- label fonts and font sizes (e.g. set label "Hallo" at x,y font "Helvetica,34")
- and multiple graphs on the page. The proportions of the axes are not changed.
-
- Syntax:
-
- set terminal tgif {portrait | landscape} {<[x,y]>}
- {solid | dashed}
- {"<fontname>"} {<fontsize>}
-
- where <[x,y]> specifies the number of graphs in the x and y directions on the
- page, "<fontname>" is the name of a valid PostScript font, and <fontsize>
- specifies the size of the PostScript font. Defaults are portrait, [1,1],
- dashed, "Helvetica", and 18.
-
- The solid option is usually prefered if lines are colored, as they often are
- in the editor. Hardcopy will be black-and-white, so dashed should be chosen
- for that.
-
- Multiplot is implemented in two different ways.
-
- The first multiplot implementation is the standard gnuplot multiplot feature:
-
- set terminal tgif
- set output "file.obj"
- set multiplot
- set origin x01,y01
- set size xs,ys
- plot ...
- ...
- set origin x02,y02
- plot ...
- set nomultiplot
-
- See set multiplot for further information.
-
- The second version is the [x,y] option for the driver itself. The advantage
- of this implementation is that everything is scaled and placed automatically
- without the need for setting origins and sizes; the graphs keep their natural
- x/y proportions of 3/2 (or whatever is fixed by set size).
-
- If both multiplot methods are selected, the standard method is chosen and a
- warning message is given.
-
- Examples of single plots (or standard multiplot):
-
- set terminal tgif # defaults
- set terminal tgif "Times-Roman" 24
- set terminal tgif landscape
- set terminal tgif landscape solid
-
- Examples using the built-in multiplot mechanism:
-
- set terminal tgif portrait [2,4] # portrait; 2 plots in the x-
- # and 4 in the y-direction
- set terminal tgif [1,2] # portrait; 1 plot in the x-
- # and 2 in the y-direction
- set terminal tgif landscape [3,3] # landscape; 3 plots in both
- # directions
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.60. tkcanvas ΓòÉΓòÉΓòÉ
-
- This terminal driver generates tk canvas widget commands. To use it, rebuild
- gnuplot (after uncommenting or inserting the appropriate line in "term.h"),
- then
-
- gnuplot> set term tkcanvas
- gnuplot> set output 'plot.file'
-
- After invoking "wish", execute the following sequence of tcl commands:
-
- % source plot.file
- % canvas .c
- % pack .c
- % gnuplot .c
-
- The code generated by gnuplot creates a tcl procedure called "gnuplot" that
- takes the name of a canvas as its argument. When the procedure is, called, it
- clears the canvas, finds the size of the canvas and draws the plot in it,
- scaled to fit.
-
- The current version of tkcanvas supports neither multiplot nor replot. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.61. tpic ΓòÉΓòÉΓòÉ
-
- The tpic terminal driver supports the LaTeX picture environment with tpic
- \specials. It is an alternative to the latex and eepic terminal drivers.
- Options are the point size, line width, and dot-dash interval.
-
- Syntax:
-
- set terminal tpic <pointsize> <linewidth> <interval>
-
- where pointsize and linewidth are integers in milli-inches and interval is a
- float in inches. If a non-positive value is specified, the default is chosen:
- pointsize = 40, linewidth = 6, interval = 0.1.
-
- All drivers for LaTeX offer a special way of controlling text positioning: If
- any text string begins with '{', you also need to include a '}' at the end of
- the text, and the whole text will be centered both horizontally and vertically
- by LaTeX. --- If the text string begins with '[', you need to continue it with:
- a position specification (up to two out of t,b,l,r), ']{', the text itself, and
- finally, '}'. The text itself may be anything LaTeX can typeset as an LR-box.
- \rule{}{}'s may help for best positioning.
-
- Examples: About label positioning: Use gnuplot defaults (mostly sensible, but
- sometimes not really best):
-
- set title '\LaTeX\ -- $ \gamma $'
-
- Force centering both horizontally and vertically:
-
- set label '{\LaTeX\ -- $ \gamma $}' at 0,0
-
- Specify own positioning (top here):
-
- set xlabel '[t]{\LaTeX\ -- $ \gamma $}'
-
- The other label -- account for long ticlabels:
-
- set ylabel '[r]{\LaTeX\ -- $ \gamma $\rule{7mm}{0pt}'
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.62. unixpc ΓòÉΓòÉΓòÉ
-
- The unixpc terminal driver supports AT&T 3b1 and AT&T 7300 Unix PC. It has no
- options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.63. unixplot ΓòÉΓòÉΓòÉ
-
- The unixplot terminal driver generates output in the Unix "plot" graphics
- language. It has no options.
-
- This terminal cannot be compiled if the GNU version of plot is to be used; in
- that case, use the gnugraph terminal instead. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.64. vx384 ΓòÉΓòÉΓòÉ
-
- The vx384 terminal driver supports the Vectrix 384 and Tandy color printers.
- It has no options. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.65. VWS ΓòÉΓòÉΓòÉ
-
- The VWS terminal driver supports the VAX Windowing System. It has no options.
- It will sense the display type (monochrome, gray scale, or color.) All line
- styles are plotted as solid lines. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.66. windows ΓòÉΓòÉΓòÉ
-
- Three options may be set in the windows terminal driver.
-
- Syntax:
-
- set terminal windows {<color>} {"<fontname>"} {<fontsize>}
-
- where <color> is either color or monochrome, "<fontname"> is the name of a
- valid Windows font, and <fontsize> is the size of the font in points.
-
- Other options may be set with the graph-menu, the initialization file, and set linestyle.
-
- The Windows version normally terminates immediately as soon as the end of any
- files given as command line arguments is reached (i.e. in non-interactive
- mode). It will also not show the text-window at all, in this mode, only the
- plot. By giving the optional argument /noend or -noend, you can disable this
- behaviour. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.66.1. graph-menu ΓòÉΓòÉΓòÉ
-
- The gnuplot graph window has the following options on a pop-up menu accessed by
- pressing the right mouse button or selecting Options from the system menu:
-
- Bring to Top when checked brings the graph window to the top after every plot.
-
- Color when checked enables color linestyles. When unchecked it forces
- monochrome linestyles.
-
- Copy to Clipboard copies a bitmap and a Metafile picture.
-
- Background... sets the window background color.
-
- Choose Font... selects the font used in the graphics window.
-
- Line Styles... allows customization of the line colors and styles.
-
- Print... prints the graphics windows using a Windows printer driver and allows
- selection of the printer and scaling of the output. The output produced by
- Print is not as good as that from gnuplot's own printer drivers.
-
- Update wgnuplot.ini saves the current window locations, window sizes, text
- window font, text window font size, graph window font, graph window font size,
- background color and linestyles to the initialization file WGNUPLOT.INI. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.66.2. printing ΓòÉΓòÉΓòÉ
-
- In order of preference, graphs may be be printed in the following ways.
-
- 1. Use the gnuplot command set terminal to select a printer and set output to
- redirect output to a file.
-
- 2. Select the Print... command from the gnuplot graph window. An extra
- command screendump does this from the text window.
-
- 3. If set output "PRN" is used, output will go to a temporary file. When you
- exit from gnuplot or when you change the output with another set output
- command, a dialog box will appear for you to select a printer port. If you
- choose OK, the output will be printed on the selected port, passing unmodified
- through the print manager. It is possible to accidentally (or deliberately)
- send printer output meant for one printer to an incompatible printer. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.66.3. text-menu ΓòÉΓòÉΓòÉ
-
- The gnuplot text window has the following options on a pop-up menu accessed by
- pressing the right mouse button or selecting Options from the system menu:
-
- Copy to Clipboard copies marked text to the clipboard.
-
- Paste copies text from the clipboard as if typed by the user.
-
- Choose Font... selects the font used in the text window.
-
- System Colors when selected makes the text window honor the System Colors set
- using the Control Panel. When unselected, text is black or blue on a white background.
-
- Update wgnuplot.ini saves the current text window location, text window size,
- text window font and text window font size to the initialisation file WGNUPLOT.INI.
-
- MENU BAR
-
- If the menu file WGNUPLOT.MNU is found in the same directory as WGNUPLOT.EXE,
- then the menu specified in WGNUPLOT.MNU will be loaded. Menu commands:
-
- [Menu] starts a new menu with the name on the following line.
-
- [EndMenu] ends the current menu.
-
- [--] inserts a horizontal menu separator.
-
- [|] inserts a vertical menu separator.
-
- [Button] puts the next macro on a push button instead of a menu.
-
- Macros take two lines with the macro name (menu entry) on the first line and
- the macro on the second line. Leading spaces are ignored. Macro commands:
-
- [INPUT] --- Input string with prompt terminated by [EOS] or {ENTER}
-
- [EOS] --- End Of String terminator. Generates no output.
-
- [OPEN] --- Get name of file to open from list box, with title of list box
- terminated by [EOS], followed by default filename terminated by [EOS] or
- {ENTER}. This uses COMMDLG.DLL from Windows 3.1.
-
- [SAVE] --- Get name of file to save. Similar to [OPEN]
-
- Macro character substitutions:
-
- {ENTER} --- Carriage Return '\r'
-
- {TAB} --- Tab '\011'
-
- {ESC} --- Escape '\033'
-
- {^A} --- '\001'
-
- ...
-
- {^_} --- '\031'
-
- Macros are limited to 256 characters after expansion. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.66.4. wgnuplot.ini ΓòÉΓòÉΓòÉ
-
- Windows gnuplot will read some of its options from the [WGNUPLOT] section of
- WGNUPLOT.INI in the Windows directory. A sample WGNUPLOT.INI file:
-
- [WGNUPLOT]
- TextOrigin=0 0
- TextSize=640 150
- TextFont=Terminal,9
- GraphOrigin=0 150
- GraphSize=640 330
- GraphFont=Arial,10
- GraphColor=1
- GraphToTop=1
- GraphBackground=255 255 255
- Border=0 0 0 0 0
- Axis=192 192 192 2 2
- Line1=0 0 255 0 0
- Line2=0 255 0 0 1
- Line3=255 0 0 0 2
- Line4=255 0 255 0 3
- Line5=0 0 128 0 4
-
- The GraphFont entry specifies the font name and size in points. The five
- numbers given in the Border, Axis and Line entries are the Red intensity
- (0--255), Green intensity, Blue intensity, Color Linestyle and Mono Linestyle.
- Linestyles are 0=SOLID, 1=DASH, 2=DOT, 3=DASHDOT, 4=DASHDOTDOT. In the sample
- WGNUPLOT.INI file above, Line 2 is a green solid line in color mode, or a
- dashed line in monochrome mode. The default line width is 1 pixel. If
- Linestyle is negative, it specifies the width of a SOLID line in pixels. Line1
- and any linestyle used with the points style must be SOLID with unit width. Go
- Up
-
-
- ΓòÉΓòÉΓòÉ 3.66.5. windows3.0 ΓòÉΓòÉΓòÉ
-
- Windows 3.1 is preferred, but WGNUPLOT will run under Windows 3.0 with the
- following restrictions: 1. COMMDLG.DLL and SHELL.DLL (available with Windows
- 3.1 or Borland C++ 3.1) must be in the windows directory.
-
- 2. WGNUPLOT.HLP produced by Borland C++ 3.1 is in Windows 3.1 format. You need
- to use the WINHELP.EXE supplied with Borland C++ 3.1.
-
- 3. It will not run in real mode due to lack of memory.
-
- 4. TrueType fonts are not available in the graph window.
-
- 5. Drag-drop does not work. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.67. x11 ΓòÉΓòÉΓòÉ
-
- gnuplot provides the x11 terminal type for use with X servers. This terminal
- type is set automatically at startup if the DISPLAY environment variable is
- set, if the TERM environment variable is set to xterm, or if the -display
- command line option is used.
-
- Syntax:
-
- set terminal x11 {reset} {<n>}
-
- Multiple plot windows are supported: set terminal x11 <n> directs the output to
- plot window number n. If n>0, the terminal number will be appended to the
- window title and the icon will be labeled gplt <n>. The active window may
- distinguished by a change in cursor (from default to crosshair.)
-
- Plot windows remain open even when the gnuplot driver is changed to a
- different device. A plot window can be closed by pressing the letter q while
- that window has input focus, or by choosing close from a window manager menu.
- All plot windows can be closed by specifying reset, which actually terminates
- the subprocess which maintains the windows (unless -persist was specified).
-
- Plot windows will automatically be closed at the end of the session unless the
- -persist option was given.
-
- The size or aspect ratio of a plot may be changed by resizing the gnuplot window.
-
- Linewidths and pointsizes may be changed from within gnuplot with set linestyle.
-
- For terminal type x11, gnuplot accepts (when initialized) the standard X
- Toolkit options and resources such as geometry, font, and name from the command
- line arguments or a configuration file. See the X(1) man page (or its
- equivalent) for a description of such options.
-
- A number of other gnuplot options are available for the x11 terminal. These
- may be specified either as command-line options when gnuplot is invoked or as
- resources in the configuration file "/.Xdefaults". They are set upon
- initialization and cannot be altered during a gnuplot session. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.67.1. command-line_options ΓòÉΓòÉΓòÉ
-
- In addition to the X Toolkit options, the following options may be specified on
- the command line when starting gnuplot or as resources in your ".Xdefaults"
- file:
-
- `-clear` requests that the window be cleared momentarily before a
- new plot is displayed.
- `-gray` requests grayscale rendering on grayscale or color displays.
- (Grayscale displays receive monochrome rendering by default.)
- `-mono` forces monochrome rendering on color displays.
- `-persist` plot windows survive after main gnuplot program exits
- `-raise` raise plot window after each plot
- `-noraise` do not raise plot window after each plot
- `-tvtwm` requests that geometry specifications for position of the
- window be made relative to the currently displayed portion
- of the virtual root.
-
- The options are shown above in their command-line syntax. When entered as
- resources in ".Xdefaults", they require a different syntax.
-
- Example:
-
- gnuplot*gray: on
-
- gnuplot also provides a command line option (-pointsize <v>) and a resource,
- gnuplot*pointsize: <v>, to control the size of points plotted with the points
- plotting style. The value v is a real number (greater than 0 and less than or
- equal to ten) used as a scaling factor for point sizes. For example,
- -pointsize 2 uses points twice the default size, and -pointsize 0.5 uses points
- half the normal size. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.67.2. monochome_options ΓòÉΓòÉΓòÉ
-
- For monochrome displays, gnuplot does not honor foreground or background
- colors. The default is black-on-white. -rv or gnuplot*reverseVideo: on
- requests white-on-black. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.67.3. color_resources ΓòÉΓòÉΓòÉ
-
- For color displays, gnuplot honors the following resources (shown here with
- their default values) or the greyscale resources. The values may be color
- names as listed in the X11 rgb.txt file on your system, hexadecimal RGB color
- specifications (see X11 documentation), or a color name followed by a comma and
- an intensity value from 0 to 1. For example, blue, 0.5 means a half intensity
- blue.
-
- gnuplot*background: white
- gnuplot*textColor: black
- gnuplot*borderColor: black
- gnuplot*axisColor: black
- gnuplot*line1Color: red
- gnuplot*line2Color: green
- gnuplot*line3Color: blue
- gnuplot*line4Color: magenta
- gnuplot*line5Color: cyan
- gnuplot*line6Color: sienna
- gnuplot*line7Color: orange
- gnuplot*line8Color: coral
-
- The command-line syntax for these is, for example,
-
- Example:
-
- gnuplot -background coral
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.67.4. grayscale_resources ΓòÉΓòÉΓòÉ
-
- When -gray is selected, gnuplot honors the following resources for grayscale or
- color displays (shown here with their default values). Note that the default
- background is black.
-
- gnuplot*background: black
- gnuplot*textGray: white
- gnuplot*borderGray: gray50
- gnuplot*axisGray: gray50
- gnuplot*line1Gray: gray100
- gnuplot*line2Gray: gray60
- gnuplot*line3Gray: gray80
- gnuplot*line4Gray: gray40
- gnuplot*line5Gray: gray90
- gnuplot*line6Gray: gray50
- gnuplot*line7Gray: gray70
- gnuplot*line8Gray: gray30
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.67.5. line_resources ΓòÉΓòÉΓòÉ
-
- gnuplot honors the following resources for setting the width (in pixels) of
- plot lines (shown here with their default values.) 0 or 1 means a minimal
- width line of 1 pixel width. A value of 2 or 3 may improve the appearance of
- some plots.
-
- gnuplot*borderWidth: 2
- gnuplot*axisWidth: 0
- gnuplot*line1Width: 0
- gnuplot*line2Width: 0
- gnuplot*line3Width: 0
- gnuplot*line4Width: 0
- gnuplot*line5Width: 0
- gnuplot*line6Width: 0
- gnuplot*line7Width: 0
- gnuplot*line8Width: 0
-
- gnuplot honors the following resources for setting the dash style used for
- plotting lines. 0 means a solid line. A two-digit number jk (j and k are >= 1
- and <= 9) means a dashed line with a repeated pattern of j pixels on followed
- by k pixels off. For example, '16' is a "dotted" line with one pixel on
- followed by six pixels off. More elaborate on/off patterns can be specified
- with a four-digit value. For example, '4441' is four on, four off, four on,
- one off. The default values shown below are for monochrome displays or
- monochrome rendering on color or grayscale displays. For color displays, the
- default for each is 0 (solid line) except for axisDashes which defaults to a
- '16' dotted line.
-
- gnuplot*borderDashes: 0
- gnuplot*axisDashes: 16
- gnuplot*line1Dashes: 0
- gnuplot*line2Dashes: 42
- gnuplot*line3Dashes: 13
- gnuplot*line4Dashes: 44
- gnuplot*line5Dashes: 15
- gnuplot*line6Dashes: 4441
- gnuplot*line7Dashes: 42
- gnuplot*line8Dashes: 13
- Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.68. xlib ΓòÉΓòÉΓòÉ
-
- The xlib terminal driver supports the X11 Windows System. It generates
- gnulib_x11 commands. set term x11 behaves similarly to set terminal xlib; set
- output "|gnuplot_x11". xlib has no options, but see x11. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.69. AUTHOR ΓòÉΓòÉΓòÉ
-
- Autogenerated from *.trm files in gnuplot terminals subdirectory. Go Up
-
-
- ΓòÉΓòÉΓòÉ 3.70. SEE ALSO ΓòÉΓòÉΓòÉ
-
- Term::Gnuplot.