Hi all:
> When I use matplotlib for a scatter plot with both dots and connecting
> lines, the exported eps file is huge, if the distances between many points
> are small. I think of this as a bug, since no preview tiff is included in
> the generated eps and a variety of text processing applications (including
> OpenOffice) crash when I try to import the eps. Ghostscript takes forever,
> too. Is there anything that I can do in order to export reasonable eps
> files?I suggest upgrading to 0.87.3.
However, I still do see no working Gentoo ebuild. Is there any out there?
The bigger problem is that each file format has basic characteristics
and limitations. If you draw a million markers and line segments, you
are inevitably going to have a big postscript file, unless the
postscript backend somehow detects the fact that almost all of your
points are indistinguishable and therefore deletes most of them--and
this is really asking too much of a plotting backend, I think. (An
alternative is to generate a pixel image and make the postscript from
that; this is what matlab does under some circumstances, but it can
result in big files of poor quality.)
The problems with crashing applications do not occur, if only dots are
printed. Furthermore, only if line lengths shrink to infinitesimal values,
ghostscript keeps processing them with a CPU load of 100% and Gigabytes of
RAM consumption. Even if this may be a ghostscript bug, I think that
a postscript backend for scientific plotting should look for lines that
have a length of less than epsilon (what might be 1/1e6 inch or
something) and exclude them from the eps. Looking for dots that lie close
together however surely would be too much to ask for but this does not
lead ghostscript, OpenOffice, etc. to fail. (Printers normally time out.)
Finally, we dont include tiff previews in our eps files, so this is not a bug.
At least for me, including a tiff preview would really be beneficial.
I did not want to call this behavior a bug, but please consider such an
option.
Your options include: filter your points beforehand so you only plot
points that are distinct; or use a pixel-based format like png, which
keeps the file size under control.
Unfortunately, this much easier in the proof of error that I sent
you than in my actual problem, since I then have to create a copy
of the data just for plotting.
Thus, for now I use png images but I still would prefer eps.
Thank you for all of your answers.
Martin