[pstricks] PSTricks Digest, Vol 102, Issue 13
grivet
grivet at cnrs-orleans.fr
Fri Aug 12 14:21:59 CEST 2011
Hello,
I have a problem with the "exp" function of pst-plot. I have copied a
recent piece of code by Herbert Vosz (from july 7th) and simply changed
a "sin" function for an "exp", thus:
\documentclass{article}
\usepackage{pst-plot}
\begin{document}
\psset{unit=.8cm,plotpoints=500}
\begin{pspicture}(-1,-3)(11,7)
\psaxes[arrowscale=2,Dx=20,dx=2,Dy=20,dy=2,subticks=10,
,ticklinestyle=dashed,yticksize=0 10,xticksize=-3 7,
tickcolor=black!50,subtickcolor=black!20,
subticksize=1]{->}(0,0)(0,-3)(10.5,7.5)[$x$,-90][$y$,180]
\psplot[linewidth=1.5pt,algebraic,
linecolor=red]{0}{10}{4*exp(-x/3)+2}
\end{pspicture}
\end{document}
This compiles allright but will not display in yap, with error message:
MiKTeX Problem Report
Message: Some PostScript specials could not be rendered.
Data: Error: /typecheck in --moveto--
Operand stack:
--nostringval-- PermitFileReading --nostringval--
PermitFileWriting --nostringval-- 45.5246
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval--
--nostringval-- --nostringval-- false 1 %stopped_push 1914
1 3 %oparray_pop 1913 1 3 %oparray_pop 1897 1 3
%oparray_pop 1787 1 3 %oparray_pop --nostringval--
%errorexec_pop .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1166/1684(ro)(G)-- --dict:0/20(G)-- --dict:87/200(L)--
--dict:95/300(L)-- --dict:37/200(L)-- --dict:128/200(L)--
Current allocation mode is local
MiKTeX GPL Ghostscript 9.00: Unrecoverable error, exit code 1
nor in ghostview:
GSview 4.9 2007-11-18
Unknown in Comments section at line 8:
%%DocumentFonts: CMR10 CMSY10 CMMI10
<a few hundred such lines deleted>
GPL Ghostscript 9.00 (2010-09-14)
Copyright (C) 2010 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Displaying DSC file D:/travail/essai1.ps
Displaying page 1
Error: /stackunderflow in --moveto--
Operand stack:
45.5246
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval--
--nostringval-- false 1 %stopped_push 1910 1 3
%oparray_pop 1909 1 3 %oparray_pop 1893 1 3
%oparray_pop 1787 1 3 %oparray_pop --nostringval--
%errorexec_pop .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1163/1684(ro)(G)-- --dict:0/20(G)-- --dict:91/200(L)--
--dict:177/300(L)-- --dict:37/200(L)-- --dict:128/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
--- Begin offending input ---
h pop } PutCoor
PutBegin end
828 1763 a 828 1763 a
tx at Dict begin { 5.0 5.2616 4.30554 1.94444 180. Uput UUput } PutCoor
PutBegin end
828 1763 a 806 1773 a Fa(y)828
1763 y
tx at Dict begin PutEnd end
828 1763 a 828 1763 a
tx at Dict begin PutEnd end
828 1763 a @beginspecial
@setspecial
tx at Dict begin STP newpath /ArrowA { moveto } def /ArrowB { } def
1.5 SLW 1 0 0 setrgbcolor /ArrowA { moveto } def /ArrowB { } def
/x 0 def /x1 10 def /dx x1 x sub 499 div def /F at pstplot (4*exp(-x/3)+2)
tx at AlgToPs begin AlgToPs end cvx def /xy { x 22.76228 mul F at pstplot
22.76228 mul } def /ps at Exit false def xy moveto 499 1 sub { /x x
dx add def xy dup 1.e30 22.76228 mul gt { moveto }{ dup -1.e30 22.76228
mul lt { moveto }{ L } ifelse } ifelse } ps at Exit { exit } if repeat
ps at Exit not { /x x1 def xy dup 1.e30 22.76228 mul gt { moveto }{ dup
-1.e30 22.76228 mul lt { moveto }{ L } ifelse } ifelse } if gsave
1.5 SLW 1 0 0 setrgbcolor 1. .setopacityalpha 0 setlinejoin 0
setlinecap stroke grestore end
@ends
--- End offending input ---
file offset = 134014
gsapi_run_string_continue returns -101
Could anybody tell me what's wrong ?
TIA,
JP Grivet
More information about the PSTricks
mailing list