octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: updated print.m


From: Shai Ayal
Subject: Re: updated print.m
Date: Tue, 21 Apr 2009 06:36:39 +0300

On Tue, Apr 21, 2009 at 4:07 AM, Ben Abbott <address@hidden> wrote:
> I noticed that converting an eps-file to a bitmap does not give the same
> result as printing a bitmap.

This is a because gnuplot's ps terminal does not produce the same
output as it's jpeg terminal, it's not a fault of gs. I generally find
gnuplot's ps terminal to be th most complete, so I always use it, and
convert to pdf/png/jpeg as necessary.


>
> Consider the example ...
>
>        figure (1)
>        clf
>        plot (1:10)
>        set (gca, "fontsize", 12)
>        xlabel ("my xlabel")
>        ylabel ("my ylabel")
>        title ("my title")
>        print (gcf, "-djpeg", "test.jpeg")
>        print (gcf, "-deps", "test.eps")
>        system ("gs -r150 -sDEVICE=jpeg -sOutputFile=test_gs.jpeg -dEPSCrop
> -dBATCH test.eps")
>
> The quality of the converted jpeg is degraded and the fontsize is different.
> If the fontsize is increased by 50%, then the proper size is obtained (I may
> be off by a point or two).

I would recommend the following gs command line to convert from eps:

 sprintf("gs -r%s -q -dBATCH -dEPSCrop -dSAFER -dNOPAUSE
-dTextAlphaBits=4 -sDEVICE=%s -sOutputFile=\"%s\" \"%s\"", res , dev,
outfile, infile);

 BTW,  I would not recommend using jpeg for graphs -- jpeg's lossy
compression algorithm is really geared towards compressing photos, and
degrades the picture in a very noticeable way for graphs. I would use
png which has lossless compression and compresses graphs very well.

Shai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]