\\ center has to be a string. v is a sequence of complex numbers, \\ typically the vector of values of a Fourier transform. \\ inner is the radius of the white inner circle (may be 0). t_fouriercircle (v,center,R=0.5) = {my (r,pd,args,n,dalfa,alfa,beta,tex); r=apply(abs,v); pd=Pi/180; args=apply(z->if(z,arg(z),0),v); n=#v; dalfa=360.0/n; alfa=-dalfa/2; beta=dalfa/2; tex="\\definecolorseries{fcolor}{hsb}{last}[hsb]{0,1,1}[hsb]{1,1,1}"; tex=Strprintf("%s\n\\resetcolorseries[%d]{fcolor}",tex,n); tex=Strprintf("%s\n\\psset {fillstyle=solid, linewidth=0.2pt}",tex); for (i=1,n,tex=Strprintf("%s\n%s",tex,\ Strprintf("\\pswedge [fillcolor={fcolor!![%d]}] (%s) {%.2f} {%.2f} {%.2f}",\ (n*args[i])\(2*Pi),center,R+r[i],alfa,beta)); [alfa,beta]=[beta,beta+dalfa]); tex=Strprintf("%s\n\\pscircle [linewidth=0.1pt] (%s) {%.2f}",tex,center,R); tex}