[metapost] problems with memory in metapost
Yogeshwarsing Calleecharan
yogeshwarsing.calleecharan at ltu.se
Sun May 9 07:24:32 CEST 2010
Ok I'll sent you an email to how get the files.
Thanks
Best Regards,
yogeshwarsing
On 5/8/2010 10:20 PM, Reinhard Kotucha wrote:
> On 8 May 2010 Yogeshwarsing Calleecharan wrote:
>
> > Thanks. But how to write such a "script". In what language?
>
> I usually use Perl for things like this but any scripting language
> supporting regular expressions is fine.
>
> > can this be done on the command line in Win XP?
>
> Not directly. Windows doesn't provide such tools. But even on Unix I
> prefer a programming language like Perl.
>
> If you are not familiar with scripting languages and regular
> expressions, please put the file on a web server where I can download
> it or, if impossible, send it to me by mail. But please note that
> web.de rejects mails bigger than 5MB.
>
> Regards,
> Reinhard
>
> > Thanks
> >
> > On 5/8/2010 2:32 PM, Reinhard Kotucha wrote:
> > > On 8 May 2010 Taco Hoekwater wrote:
> > >
> > > > 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
> > >
> > > If all these rectangles have the same shape and size, one could
> > > post-process the file and define a procedure:
> > >
> > > /R { newpath moveto
> > > 2 -2 rlineto 2 2 rlineto -2 2 rlineto closepath stroke
> > > } def
> > >
> > > Then the code-snippet above can be replaced by:
> > >
> > > 414.37424 124.80127 R
> > >
> > > This is actually equivalent to
> > >
> > > newpath 414.37424 124.80127 moveto
> > > 2 -2 rlineto
> > > 2 2 rlineto
> > > -2 2 rlineto
> > > closepath stroke
> > >
> > > Note the use of relative coordinates and rlineto.
> > >
> > > This should save a lot of space but requires some post-processing.
> > >
> > > Regards,
> > > Reinhard
> > >
> >
> >
More information about the metapost
mailing list