[pstricks] multido in psplot

Arnaud Schmittbuhl aschmittbuhl at libertysurf.fr
Fri Feb 25 14:12:38 CET 2005


On Fri, 25 Feb 2005 13:35:05 +0200
Aydin Ustun <austun at selcuk.edu.tr> wrote:

> Hi all,
> 
> I want to use multido in psplot to write a function with multi-term. 
> Although latex compiler works without any problem, postscript viewer 
> does not display the function.
> 
> What is the problem?


Hi,

The problem is that postscript don't understand latex macros !
I think you can not insert latex code (\multido) in last psplot arg.
The loop as to be done in postscript 


last psplot :

\psplot[linecolor=blue,plotpoints=400,linewidth=.5pt]{-0.25}{2.25}
       {180 x mul sin 
       %% begin loop
       %% this mean 
       %% for iA=1 to 11 step 2 do 
       %%   iA 180 mul x mul sin iA div add
       %% endfor
       3 2 11 {/iA exch def iA 180 mul x mul sin iA div add} for
       %% end loop
       4 mul 3.14159 div}

PS: faster loop (uses iA on the stack)
       3 2 11 {dup 180 mul x mul sin exch div add} for


-- 
Arnaud Schmittbuhl
Montpellier, France




More information about the PSTricks mailing list