Go to the first, previous, next, last section, table of contents.


Graphics/Fonts

What graphics devices does S/S-PLUS support?

`S'
S provides a device-independent model for graphics and supports batch output devices such as laser printers and phototypesetters that use the PostScript language, the pic preprocessor language for troff, ordinary character-based printers and terminals, Hewlett-Packard pen plotters that use the HP-GL language, graphics terminals using Tektronix and Hewlett-Packard conventions, and terminals/workstations running the X window system. Enhancers have added devices and features.
`S-PLUS'
S-PLUS includes the graphics drivers that come with S, with the x11() device replaced by X11(). In addition, S-PLUS has two graphics drivers tailored to particular window managers: openlook() and motif(). The Windows version of S-PLUS supports the standard Windows graphics driver using win.graph(), and includes a printer driver win.printer(). S-PLUS 4.0 for Windows introduces a new Windows graphics driver graphsheet() which generates point-and-click editable graphics.

How do I find what graphics devices my S/S-PLUS supports?

Execute the expression

  help(Devices)

Does S/S-PLUS have a menu-based interface?

S-PLUS 4.0 for Windows provides a wealth of menu and dialog based functionality, including completely extensible and customizable menus and dialogs.

S-PLUS 3.4 for UNIX does not have built-in statistics menus, but does include tools for building menus and dialogs.

Does S have dynamic graphics? Does S-PLUS?

Most software to support dynamic graphics is tuned to a particular output device. Since S provides a device-independent graphical system, there are no dynamic graphics applications that are part of S. However, S has been used effectively as a platform from which device-dependent graphics code can be executed. In this case, S provides for data management, computations, etc., and hardware-specific routines are called to produce the dynamic displays. For users on Silicon Graphics machines, S provides library(brush) which implements brushing and point cloud rotation using SGI's gl library.

S-PLUS does have dynamic graphics using the X and sunview window systems; see its brush() and spin() functions.

How can I generate figures in S/S-PLUS for inclusion elsewhere?

S-PLUS 4.0 for Windows makes it easy to export graphics to a wide variety of formats through the File:Export Graph menu item.

For S-PLUS 3.4 for UNIX, a summary of comments by Bill Venables, Dave Smith and Brian Ripley follows.

The alternatives are either to produce PostScript directly from S/S-PLUS, or to go via a graphical representation such as that of fig (a public domain drawing package).

  1. S has the postscript() driver, as in
    postscript(file="1.eps", height=4, width=5, horiz=T, pointsize=8)
    
    If you use postscript() directly, remember to call graphics.off() (or quit S) after finishing the plot calls. S-PLUS users can call postscript() via dev.print().
  2. S-PLUS up to version 3.0 has the pscript() driver, which can be used either directly (with "onefile=F" and calling graphics.off() after use) or via
    dev.print(pscript, onefile=F, print=F, ...)
    
  3. With a windowing system and S-PLUS one can replace the `PostScript Print Command' in the graphics window by rmv filename and click on print. [Here rmv is a shell script with contents mv $2 $1.] If this is available, this is the easiest way.
  4. To produce plots in the fig format use the fig() driver obtainable from statlib by send fig from S. (See section What is the statlib server? How can I access it?, for information on statlib).

To include PostScript in TeX/LaTeX documents you need to consult the details of your dvi to ps program. Two macro packages, epsf and psfig, make the job much easier. Both are distributed with Tomas Rokicki's dvips, obtainable from labrea.stanford.edu in ~ftp/pub. In 3/93 the latest version was 5.514. Other versions of epsf and psfig are available for other dvi to ps programs, from a wide variety of archives. A wide range of PostScript editors are available, and cognescenti can edit PostScript directly.

Fig-format plots can be edited with xfig and converted to Encapsulated PostScript (and a number of other formats) with fig2dev. (Both are now version 2.1). They are part of the X11R5 distribution, but can be obtained separately by anonymous ftp from export.lcs.mit.edu in the directory /pub/R5untarred/contrib/clients.

How can I plot complicated text using mixed fonts, etc?

Alan M. Zaslavsky has placed an archive of contributed collections on statlib (See section What is the statlib server? How can I access it?, for information on statlib) named postscriptfonts. A short description of the files is given below.

Functions to display postscript fonts and, using the postscript() driver, to add text to a plot (or the margin of a plot) that contains mixed fonts (including Greek), mixed character sizes, local and motions (e.g., sub and superscripts).

`fontdemo'
`ps.show.fonts'
Generate displays of the fonts available.
`mixed.text'
`mixed.mtext'
Functions for plotting of text containing different fonts, sizes, and local motions using within-text escape sequences to define these changes.
`mixed.text.vector'
`mixed.mtext.vector'
Functions for plotting of text containing different fonts, sizes, and local motions using auxiliary vectors to define these changes.
`ps.preamble.ISO.LATIN'
A postscript preamble with extended characters (may be used by calling postscript(preamble=ps.preamble.ISO.LATIN)).


Go to the first, previous, next, last section, table of contents.