On Tue, Oct 23, 2012 at 10:28 PM, Ethan A Merritt wrote:
> I suppose there remain other terminals that could benefit from
> filtering to reduce the size of the output. lua? aqua?
Aqua uses additional division of 20 "gnuplot points" per pixel. (That
probably means that it would see duplicates less often, but I might be
wrong. I'm not sure how X11 works. And that's not an excuse for not at
least doing a few benchmarks.)
The main question is: should that be handled in backend (AquaTerm
library itself ignoring new points when the new point is the same as
the last one) or inside gnuplot (detecting and removing duplicate
entries - but that could best be done already before vector() is
For ConTeXt I already filtered out all duplicates (repeated colour
settings, vector() leading to the same point as the previous one, ...
you can take a look at CONTEXT_vector(...)), but in cases where it
would make any difference (lots and lots of points) the terminal is
not able to handle the amount of data efficiently anyway. More or less
the same is true for lua. Creating plots with 10^4 points is an
overkill for both TeX and the PDF viewer.
(I'm not trying to say that it shouldn't be done for lua, I'm just
saying that it probably wouldn't benefit on the same front as it does
for X11. Lua/TikZ or ConTeXt could in principle also improve
efficiency by reducing precision and using shorter TeX/mp commands.)
On 10/23/12 23:07, Mojca Miklavec wrote:
> the same is true for lua. Creating plots with 10^4 points is an
> overkill for both TeX and the PDF viewer.
I don't know the details how and when TeX is used but In relation to pdf
I would be careful about assuming everyone reads a PDF at "fit to width"
zoom level as you appear to do in making the statement.
I see no reason why someone would not want to create a pdf with 10^4
points with the intention that the viewer may want to zoom in to any
portion of the graph to examine the detail. I prefer svg for this sort
of thing but pdf is a more ubiquitous format that will probably be used
more often in this kind of case.
I often read papers in pdf and need to zoom in on the graphs. Sometimes
the result is barely legible because the authors have included a poor
resolution bitmap image which is very frustrating.
I see no, a priori reason why 10^4 points would be overkill for PDF.