Graphics, Figures & Tables! TeX capacity exceeded, sorry [main memory size=2500000].

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ejeh
Posts: 1
Joined: Fri Aug 14, 2009 7:14 pm

! TeX capacity exceeded, sorry [main memory size=2500000].

Post by ejeh »

I'm using PcTex 6.

If you repeat the graph in the same page, the capacity is exceeded.

Something wrong with my postscript? With psplotTangent?

thanks.

Code: Select all

\documentclass[12pt]{amsbook}
\RequirePackage{xcolor}
\RequirePackage{pstricks-add}
\definecolor{Gray}{cmyk}{0,0,0,.5}
\definecolor{Maroon}{cmyk}{0,.87,.68,.32}
\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{center}
{
\psset{ticks=none,xAxisLabel=$x$,yAxisLabel=$y$,arrowscale=1.5}
\begin{psgraph*}{->}(0,0)(-1,-1)(10,1){5 cm}{5 cm}
\def\MiDeri{5 \nc\space 5 div 1.25 exp mul 0.8 exp}  % Mi derivada
\pstVerb{%
/Origen{ 2 dict begin
/nx exch def % Segundo parámetro
/nc exch def % Primer parámetro
nx
nc 5 div 1.25 exp
end } def
%%
/Origenneg{ 2 dict begin
/nx exch def
/nc exch def
nx
nc 5 div 1.25 exp neg
end } def
}
%% \nc coordenada al origen
\multido{\nc=.5+.5}{8}{%
\psplot[linecolor=Gray,plotpoints=300]{0}{10}{\nc\space 5 div 1.25 exp}
\psplot[linecolor=Gray,plotpoints=300]{0}{10}{\nc\space 5 div 1.25 exp neg}
\multido{\nx=.5+0.5}{20}{%
%% The problem is here; <<===========================================
\psplotTangent[origin={!\nc\space \nx\space Origen},linecolor=Gray,Derive=\MiDeri]{0}{.2}{0}
%\psplotTangent[origin={!\nc\space \nx\space Origenneg},linecolor=Gray,Derive=\MiDeri]{0}{.2}{0}
}}
\psplot[linecolor=Maroon,plotpoints=300]{0}{3}{x 0 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{0}{3}{x 2 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{3}{5}{x 4 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{5}{7}{x 6 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{7}{9}{x 8 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{9}{11}{x 10 sub 5 exp}
\pnode(10.3,0){Nx}\pnode(0,1.1){Ny}
\end{psgraph*}
}
\rput(Nx){$x$}\rput(Ny){$y$}
\end{center}

%\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{center}
{
\psset{ticks=none,xAxisLabel=$x$,yAxisLabel=$y$,arrowscale=1.5}
\begin{psgraph*}{->}(0,0)(-1,-1)(10,1){5 cm}{5 cm}
\def\MiDeri{5 \nc\space 5 div 1.25 exp mul 0.8 exp}  % Mi derivada
\pstVerb{%
/Origen{ 2 dict begin
/nx exch def % Segundo parámetro
/nc exch def % Primer parámetro
nx
nc 5 div 1.25 exp
end } def
%%
/Origenneg{ 2 dict begin
/nx exch def
/nc exch def
nx
nc 5 div 1.25 exp neg
end } def
%%
}
%% \nc coordenada al origen
\multido{\nc=.5+.5}{8}{%
\psplot[linecolor=Gray,plotpoints=300]{0}{10}{\nc\space 5 div 1.25 exp}
\psplot[linecolor=Gray,plotpoints=300]{0}{10}{\nc\space 5 div 1.25 exp neg}
\multido{\nx=.5+0.5}{20}{%
%% The problem is here; <<===========================================
\psplotTangent[origin={!\nc\space \nx\space Origen},linecolor=Gray,Derive=\MiDeri]{0}{.2}{0}
\psplotTangent[origin={!\nc\space \nx\space Origenneg},linecolor=Gray,Derive=\MiDeri]{0}{.2}{0}
}}
\psplot[linecolor=Maroon,plotpoints=300]{0}{3}{x 0 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{0}{3}{x 2 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{3}{5}{x 4 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{5}{7}{x 6 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{7}{9}{x 8 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{9}{11}{x 10 sub 5 exp}
\pnode(10.3,0){Nx}\pnode(0,1.1){Ny}
\end{psgraph*}
}
\rput(Nx){$x$}\rput(Ny){$y$}
\end{center}

%\newpage 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{center}
{
\psset{ticks=none,xAxisLabel=$x$,yAxisLabel=$y$,arrowscale=1.5}
\begin{psgraph*}{->}(0,0)(-1,-1)(10,1){5 cm}{5 cm}
\def\MiDeri{5 \nc\space 5 div 1.25 exp mul 0.8 exp}  % Mi derivada
\pstVerb{%
/Origen{ 2 dict begin
/nx exch def % Segundo parámetro
/nc exch def % Primer parámetro
nx
nc 5 div 1.25 exp
end } def
%%
/Origenneg{ 2 dict begin
/nx exch def
/nc exch def
nx
nc 5 div 1.25 exp neg
end } def
%%
}
%% \nc coordenada al origen
\multido{\nc=.5+.5}{8}{%
\psplot[linecolor=Gray,plotpoints=300]{0}{10}{\nc\space 5 div 1.25 exp}
\psplot[linecolor=Gray,plotpoints=300]{0}{10}{\nc\space 5 div 1.25 exp neg}
\multido{\nx=.5+0.5}{20}{%
%% The problem is here; <<===========================================
\psplotTangent[origin={!\nc\space \nx\space Origen},linecolor=Gray,Derive=\MiDeri]{0}{.2}{0}
\psplotTangent[origin={!\nc\space \nx\space Origenneg},linecolor=Gray,Derive=\MiDeri]{0}{.2}{0}
}}
\psplot[linecolor=Maroon,plotpoints=300]{0}{3}{x 0 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{0}{3}{x 2 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{3}{5}{x 4 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{5}{7}{x 6 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{7}{9}{x 8 sub 5 exp}
\psplot[linecolor=Maroon,plotpoints=300]{9}{11}{x 10 sub 5 exp}
\pnode(10.3,0){Nx}\pnode(0,1.1){Ny}
\end{psgraph*}
}
\rput(Nx){$x$}\rput(Ny){$y$}
\end{center}
\end{document}
Attachments
F01.tex
(4.3 KiB) Downloaded 233 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: ! TeX capacity exceeded, sorry [main memory size=2500000].

Post by localghost »

Works fine for me an all my systems².


Best regards and welcome to the board
Thorsten
Post Reply