Share

gnuplot development

Tracker: Bugs

5 Redundant plot points in .eps file reduce render speed - ID: 2415901
Last Update: Settings changed ( sfeam )

I'm using gnuplot 4.2 patchlevel 3.

I have a very large dataset with small differences in numbers, but many
points get plotted as the same point in the .eps file, seriously increasing
render time vs. when you strip out the duplicate points by hand:

~/hpc/proj1/bug$ time epstopdf chiba_final3.eps --outfile=/dev/null

real 0m12.419s
user 0m9.909s
sys 0m1.944s

~/hpc/proj1/bug$ time epstopdf chiba_final3.min.eps --outfile=/dev/null

real 0m1.820s
user 0m1.364s
sys 0m0.312s

My attached script eps_reducer.sh is modified exactly to work on my plots
generated by the attached plot.sh; it does a `sort -u` on all the cross
data of the plots, and the rest of the file is untouched.

I wanted to include my original test data (250MB -> 35MB bzipped), but it
doesn't look like SF will let me upload such a large file, so I'll see
later about uploading that... In the meantime, I'm attaching an original
.eps file and its "minified" version - I'll see if I can upload some
original data later if more space is available somewhere.


pieoncar ( pieoncar ) - 2008-12-11 05:17

5

Closed

None

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2008-12-11 06:08
Sender: sfeamProject Admin

But where is the bug?

This is the nature of PostScript; it contains instructions for drawing
each point regardless of where the previous points were. And because it has
effectively infinite resolution, you cannot safely assume that neighboring
points will remain overlapping if the picture is scaled up (=zoomed in).

Unless you have some strong reason otherwise, it is usually best to use a
pixel-format output mode for dense scatter plots. I would suggest you use
png, and then if necessary wrap the resulting png image as a PostScript
bitmap. That wrapped file will also be large compared to the png image
itself, but it will be of fixed size (i.e. independent of the number of
point that you plotted).




Log in to comment.

Attached File ( 1 )

Filename Description Download
gnuplot_eps_bug.tar.bz2 .eps files Download

Changes ( 3 )

Field Old Value Date By
status_id Open 2009-01-07 00:49 sfeam
close_date - 2009-01-07 00:49 sfeam
File Added 304874: gnuplot_eps_bug.tar.bz2 2008-12-11 05:17 pieoncar