[comp.binaries.ibm.pc.d] Problem printing/GNUPLOT

WXS103@psuvm.psu.edu (01/25/91)

My apologies if this is not the correct place to post this, but...

There used to be more gnu.* groups to post to, but they seem to have been
munged.  I guess they must have been pretty dead, so I'll ask here.

I really like GNUPLOT, however, I can't get it to output to my printer.
The ( *light* ) manual says that all I have to do is set the terminal type
to EPSON and then set the output to the printer.  If I do that, weird
characters and numbers appear on the paper, but no graphs.

I've even tried using postscript output to a file, but when I try a
postscript reader (OPTIKS, I think) that can display and convert image
files of many types, it says it is not in the correct format.  Has
anyone had any success with it?  Please let me know.

Thanks in advance,

Bill

(No interesting signature yet for this semester)

eln272v@monu1.cc.monash.oz ( r lang) (01/25/91)

In article <91024.131351WXS103@psuvm.psu.edu>, WXS103@psuvm.psu.edu writes:
> I really like GNUPLOT, however, I can't get it to output to my printer.
> The ( *light* ) manual says that all I have to do is set the terminal type
> to EPSON and then set the output to the printer.  If I do that, weird
> characters and numbers appear on the paper, but no graphs.

An example of printing to an epson lx-800 printer is:
C:\> gnuplot
...
gnuplot> set term epson_lx800
gnuplot> set output 'epson.out'
gnuplot> plot sin(x)
gnuplot> exit
C:\> copy /b epson.out PRN:

Note that you cannot use the DOS PRINT command - it will stop at the
first occurence of ^Z in the file.  You must use the /b binary option
of the COPY command for this.

-- 
Russell Lang   Email: rjl@monu1.cc.monash.edu.au   Phone: (03) 565 3460
Department of Electrical and Computer Systems Engineering
Monash University, Australia

mjf@cunixb.cc.columbia.edu (Michael J Flory) (01/30/91)

On the subject of printing to Epson-compatible printers with GNUPLOT, I'll
toss in a caution.  I have a Panasonic, supposedly compatible with Epson
escape-sequences.  I don't know the Epson line, though the lx-800 sounds 
like it might be 24-pin(?), and my KX-P1091 is 9-pin, but I thought I'd give
it a whirl anyway.  I got graphs that looked correct, except that the printer
was advancing 1/6 inch, and not 1/9 inch, with each line.  I traced the problem
to a line in the epson.trm file that tries to set the line spacing to 1/9
(8/72) inch: 
                     fprintf(outfile,"\033A\010")
and a footnote in the printer manual that points out that ESC+2 must be added
to ESC+A+n (that is, octal 33, "A", octal 10 should be followed by octal 33,
octal 62) to activate the n/72 inch line spacing when in "IBM PC Matrix/
Graphic Printer Mode."  I haven't been able to recompile GNUPLOT with this
change, as I don't have very up-to-date compilers -- I never got beyond 
Lesson 1 in the C primer :-) -- but I would suspect that this would cure the
glitch.  As it is, I binary-edited the output file (wishing that I had the 
binary editor everyone is seeking that will allow changes to file length) and
managed to get good output.  From the epson.trm file it looked as if I should
have been able to set my term type to PROPRINTER, incidentally, and avoid the
problem, as the PROPRINTER definition sends out an escape sequence for each 
line, but the executable that I have doesn't support PROPRINTER (I wonder if
the epson.trm in the sources was really the one used to compile the .exe).

-- Michael Flory (mjf@cunixb.cc.columbia.edu)

rjl@monu1.cc.monash.oz ( r lang) (02/06/91)

In article <1991Jan30.033630.30293@cunixf.cc.columbia.edu>, mjf@cunixb.cc.columbia.edu (Michael J Flory) writes:
> 
> On the subject of printing to Epson-compatible printers with GNUPLOT, I'll
> toss in a caution.  I have a Panasonic, supposedly compatible with Epson
> escape-sequences.  I don't know the Epson line, though the lx-800 sounds 
> like it might be 24-pin(?), and my KX-P1091 is 9-pin, but I thought I'd give
> it a whirl anyway.  
epson_lx800 is a 9 pin printer.  This driver will work with epson lx-800,
   epson lx-86, star nl-10, star nx-10, star nx-1000, ibm proprinter.
nec_cp6m is a 24 pin printer.  This will work with the NEC CP6 color printer,
the monochrome version of the same printer, and the epson lq-800.

> I traced the problem
> to a line in the epson.trm file that tries to set the line spacing to 1/9
> (8/72) inch: 
>                      fprintf(outfile,"\033A\010")
Get the latest version of gnuplot, which uses \033J\030.
This allows the same driver to be used for epson lx-800, ibm proprinter 
and probably yours as well.

To get gnuplot version 2.0 patchlevel 2, use
anonymous ftp to cs.duke.edu
directory dist/sources/gnuplot
file gnuplot2.zip

To get the sources, grab gnuplot2.02.tar.Z also.

-- 
Russell Lang   Email: rjl@monu1.cc.monash.edu.au   Phone: (03) 565 3460
Department of Electrical and Computer Systems Engineering
Monash University, Australia