[pstricks] psplot and smart numerical usage (memory exceed, buffer underflow?)
lego at wh10.tu-dresden.de
lego at wh10.tu-dresden.de
Sun Dec 13 15:01:08 CET 2009
Dear community,
I want to plot the function given (by German law):
http://www.gesetze-im-internet.de/estg/__32a.html
that concludes the income-tax-rate in dependence of your
wage-befor-taxes (Bruttoeinnahmen). Since this is a very "interesting"
way to define a formular, I simply want to draw this. The beginning was
fine, I figured out how to scale the axes, redefine the units in order
to be able to plot those sectional function graphs.
But already in section three I assume a memory problem caused by that
given formular structure.
Besides the problem on its own, I have no clue if my approach is
approriate at all.
Suggestions are very welcomed!
Included: Sourcecode so far, memory log.
\documentclass{scrartcl}
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
%\usepackage{booktabs,array}
%\usepackage{newcent}
%\usepackage[ngerman]{babel}
\usepackage{pstricks,pst-plot}
% Source
% http://www.gesetze-im-internet.de/estg/__32a.html
\begin{document}
\noindent\begin{pspicture}(-2.3,-1.6)(13,13)
%\psframe[linecolor=red](-2.3,-1.6)(13,13)
\psaxes[Dx=10000,dx=2,Dy=5000,dy=2]{->}(0,0)(0,0)(12.99,12.99)
\rput[t](6.5,-1.2){\textsf{annual income (in EUR)}}
\rput[t]{90}(-2.2,6.5){\textsf{annual income-tax (in EUR)}}
\psset{xunit=0.0002,yunit=0.0004}
\psplot[linecolor=blue]{0}{7834}{0}
\psplot[linecolor=blue]{7834}{13139}{%
/G x 7834 sub def
939.68 G mul 1000 div 1400 add G mul 10000 div
}
\psplot[linecolor=blue]{13139}{52551}{%
/G x 13139 sub def
228.74 G mul 2397 add G mul 1007 add
}
%% this is either too much or too low, where did I go wrong?
\end{pspicture}
\end{document}
Here is how much of TeX's memory you used:
3323 strings out of 94812
39020 string characters out of 1178409
117066 words of memory out of 1500000
6501 multiletter control sequences out of 10000+50000
8506 words of font info for 25 fonts, out of 1200000 for 2000
212 hyphenation exceptions out of 8191
32i,7n,43p,202b,187s stack positions out of 5000i,500n,6000p,200000b,5000s
Output written on kostenberechnung.dvi (1 page, 2968 bytes).
More information about the PSTricks
mailing list