Large postscript output

Is there any solution/workaround for this? If you submit ps

    > files to publishers they often restrict the size of the
    > files.

It is correct that matplotlib doesn't clip your lines for you at the
data level, but only at the display level. So if you want less data
in your file in postscript, you need to slice it before
plotting/saving. Earlier versions of mpl had a "data clipping"
option, but is was so rarely used I removed it to simplify the code
and make it more efficient.

But data size is probably not the source of your large postscript
files. Currently matplotlib embeds freetype fonts directly into the
ps file, which typically accounts for 90-95% of the file size for
typical figures. This can explain why your file size doesn't vary
much with data size. There are ways that this can probably be made
more efficient (embed only the glyphs used rather than the whole font
file) but Paul Barrett, who wrote the freetype postscript embedding,
was unable to find a way to do this.

You can however control this font embedding feature by setting

# use of afm fonts -- breaks mathtext but results in small files
ps.useafm : True

in your rc file This setting
tells matplotlib to use native postscript fonts, which will generate
*much* smaller files for typical plots. You sacrifice a couple of
things: the fonts in the GUI no longer will match the fonts in the
saved file, and the matplotlib mathtext features will no longer work
for postscript.

On a platform which supports tex/latex, you also have the option of
using latex to do text formatting, which does not trigger the
embedding freetype fonts problem that generates unreasonably large ps


Fonts aren't the problem in this case, it is purely the number of abcissa
points. I have tested the output of afm/non-afm an it is negligible.
We will have spectral data soon of 250k points, so it looks like I have to do
the slicing or decimation. The problem is that if the user uses the toolbar
to zoom and print the output won't be the same, or can I overload the toolbar
zoom function?
I know displaying 250k points on a screen is insane in itself, so I will have
to do decimation.