lane@u-mt.UUCP (Dick Lane) (09/25/85)
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. Thanks, Dick -- US Mail : Dick Lane, University of Montana, Missoula, MT 59812 Department of Mathematical Sciences Computer Center phone : (406) 243-2607 (406) 243-5455 UUCP : ... ! ucbvax ! ucdavis ! u-mt ! lane
rab@alice.UucP (Rick Becker) (10/10/85)
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