Article View: net.math.stat
Article #1Re: S printer plots go only to terminal
From: Rick Becker
Date: Thu, 10 Oct 1985 10:15
Date: Thu, 10 Oct 1985 10:15
27 lines
1944 bytes
1944 bytes
Dick Lane at !ucbvax!ucdavis!u-mt!lane writes:
> Within S, a sink file will capture output excepting plots. When the device
> is "printer", I would like have character plots sent to a log file for later
> printing. Is there an easy modification to S to allow this ??
>
> I can get a printable plot by starting S as follows
> ( cat -u - | S ) | tee script.file
> but I want something simpler for my students to use.
The reason that printer plots cannot be redirected to sink files is a
technical one rather than a conceptual one. The printer device driver
is a separate process that stays running as various S functions are
executed. In order to affect the printer driver, the sink function
would need to communicate the sink file name to the printer driver so
that it could open the file. With two separate processes writing the
same file, it would be important to make sure buffers were flushed to
avoid intermingling printer plot output with other output.
A more general solution would be to have a graphics redirection command
that allowed the output of any device driver to be captured in a file.
It might be patterned after the defer() function, which sends a file
name to the device driver. I've got it on my list of things to do,
but there are lots of other things on that list, too.
--
Rick Becker alice!rab research!rab
Technical Details
Message-ID:
<4410@alice.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!linus!decvax!mcnc!unc!ulysses!allegra!alice!rabReferences:
<268@u-mt.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!mcnc!unc!ulysses!allegra!alice!rab From: rab@alice.UucP (Rick Becker) Newsgroups: net.math.stat Subject: Re: S printer plots go only to terminal Message-ID: <4410@alice.UUCP> Date: Thu, 10-Oct-85 06:15:54 EDT Article-I.D.: alice.4410 Posted: Thu Oct 10 06:15:54 1985 Date-Received: Sat, 12-Oct-85 08:23:09 EDT References: <268@u-mt.UUCP> Organization: Bell Labs, Murray Hill Lines: 27 Keywords: S, plot