[pstricks] TeX memory exceeded

Michael Sharpe msharpe at ucsd.edu
Sun Jun 27 20:14:30 CEST 2010


On Jun 27, 2010, at 4:14 AM, Antoine Pairet wrote:

> Hello,
> What is the correct way to deal with TeX memory problems?
> 
> I am plotting a large amount of data from a .dat file with \listplot and
> the memory capacity of TeX is exceeded. 
> The error I got:
> 
> Runaway definition?
> ->/ArrowA { moveto } def /ArrowB { } def  0.8 SLW 0  setgray  /ArrowA
> \ETC.
> ! TeX capacity exceeded, sorry [main memory size=3000000].
> \pst at code ...5 D -4.0613 D -3.6773 D -3.521 D -3.4
>                                                  307 D -3.3236 D
> -3.0443 D ...
> l.34   \listplot[plotNo=27,plotNoMax=40]{\bspa}{\bspa}
> 
> If I plot less data, ie up to 26, no problem occurs. The problem does
> not come from the data itself. Indeed, I am able to plot data from 20 to
> 40 by commenting the 20 first lines of the listplot block.
> 
> How should this error be tackled? Should I increase TeX main memory? If
> so, how is it properly done? 
> Should I split the data into several .dat files or is the memory usage
> "linked" with the psgraph environment and not with the \readdata?
> 
> Best regards,
> Antoine  
> <bs2D.tex><bs_p21a_8.dat>_______________________________________________

You don't mention which system you are using. TeXLive is organized in quite a different way from MikTeX. With MacTeX, take a look at

http://email.esm.psu.edu/pipermail/macosx-tex/2007-September/032106.html

and for MikTeX, there's a brief explanation at

http://pp3.sourceforge.net/manual/Increase-TeX-s-memory.html

Another option is to use gnuplot to generate the curves, adding the axis and labels with pstricks. The gnuplot file would look something like

set terminal postscript eps size 9cm,9cm
unset title
unset border
unset xtics
unset ytics
unset key
set lmargin 0
set rmargin 0
set tmargin 0
set bmargin 0
set output '~/Documents/texfiles/bs.eps';
plot [ ] [-12:4] '~/Documents/texfiles/bs_p21a_8.dat' using 1:2 with l; #plot column 2 against column 1
#need one line like the above for each curve, with new column index in place of 2

Then, in your psgraph code, replace all the listplot lines with

\rput[bl](0,-12){\includegraphics{bs}}

Michael







More information about the PSTricks mailing list