[metapost] problems with memory in metapost

Taco Hoekwater taco at elvenkind.com
Sat May 8 10:42:41 CEST 2010


Yogeshwarsing Calleecharan wrote:
> Hello,
>      I've been able to make it work. I remembered that I issued the 
> command fmtutil --byfmt mpost when I updated my TL2008 to metapost 1.208 
> . I re issued the same command and then tried again the conversion of 
> the mp file to eps and it worked:
> 
> 
> E:\paper1\may06\fotos\rplots\gnup\k03>mpost --sprologues=3 
> -soutputtemplate=\"%j
> -%c.eps\" myfigu.mp
> This is MetaPost, version 1.208 (kpathsea version 3.5.7dev)
> (./myfigu.mp 
> [1{pdftex.map}<cmr10.pfb><cmsy10.pfb><cmmi10.pfb><cmmi7.pfb><cmmi5
> .pfb>] )
> 1 output file written: myfigu-1.eps
> Transcript written on myfigu.log.
> 
> Now, I have a small question: The mp file was about 4 MB while the 
> generated eps file is about 23 MB! How to make this eps file smaller? I 
> can't submit such a big size eps to a journal via email.

Adding mpprocset:=1 will help a little, but not that much.

It looks you (or gnuplot) are creating small rectangles instead
of simple dots, and that means that every data point expands into
quite a bit of postscript code:

   newpath 414.37424 124.80127 moveto
   416.37424 122.80127 lineto
   418.37424 124.80127 lineto
   416.37424 126.80127 lineto
   closepath stroke

The best the metapost backend can do (with mpprocset) is to convert
the operator names into single letters, but that will not gain you
a whole lot of bytes.

Perhaps you could draw lines instead of dots? (I don't know anything
about GNUplot's metapost output).

Best wishes,
Taco


More information about the metapost mailing list