|
From: Ethan M. <merritt@u.washington.edu> - 2007-03-12 18:37:37
|
On Monday 12 March 2007 11:03, Petr Mikulik wrote:
> > where the operator "g" is defined in the page header based on
> > the current palette. In other words, the color mapping is done
> > by the postscript interpreter, not by gnuplot. I believe the
> > reason for this was simply to make the output file shorter.
>=20
> Plus two more reasons:
> - replace the color - gray by a simple switch in the header
%% Boolean flag Color (user-editable) used to toggle palette;
%% Switch between rgb color and grayscale using ntsc conversion
\C {Color {setrgbcolor} {ntsc setgray} ifelse} def
> - possibility to change the color palette
By editing the PostScript file? That sounds like a very unusual
thing to do. Can you give an example?
> > I'm cc'ing this to Petr, who may want to comment on whether
> > there are cases where weak optimization (factor of 2 at best)
> > is still useful.=20
>=20
> It is of factor 3:
> .123
> .123 .123 .123
> thus a lot of KB's more to add into the file or (LaTeX) paper.
I think it's a factor of slightly less than 2:
Currintly routine save_space(gray) returns a 4-digit float
to be printed as "%.4g g"
.1234 g % 7 characters for 4-digit gray scale
We work internally with 24bit RGB colors in most places, so
if we were to switch to an RGB-based postscript output it could
logically be
/C {255 div 3 1 roll 255 div 3 1 roll 255 div 3 1 roll
setrgbcolor} def
yielding
RRR GGG BBB C % 13 characters for 24-bit color=20
> > So there are two questions:
> >=20
> > 1) Is this really worth doing in PostScript?
>=20
> Definitely.
>=20
> > 2) If it is worth it for PostScript, does that mean it is also
> > worth doing for pdf?
>=20
> No, pdf is not intended to be edited.
PDF is mostly just marked-up PostScript which is then compressed.
Any feature which is useful in PostScript should also be available
in PDF. Which brings up a good point...
Even aside from Timoth=E9e's new pdf driver, wouldn't it be a good
idea to offer the same user-editable flags at the start of gnuplot's
PDF output that we offer for the PostScript output? That would give
the user the same ability to tweak the *.pdf file that they already
have for the *.ps files.
=2D-=20
Ethan A Merritt Courier Deliveries: 1959 NE Pacific
Dept of Biochemistry
Health Sciences Building
University of Washington - Seattle WA 98195-7742
|