Page 1 of 1

Text in GCONTOUR

Posted: Wed Jul 08, 2015 12:15 pm
by jonasdovern
I tried to draw some markers into a contour plot using the following code:

Code: Select all

all 200

comp xgrid = %seqa(-3,.01,601)
comp ygrid = %seqa(-3,.01,601)

decl rec f(601,601)
ewise f(i,j) = 1./((2*%pi)*%det(||1,.9|.9,1||)^.5)*exp(%scalar(-1*tr(||xgrid(i)|ygrid(j)||)*inv(||1,.9|.9,1||)*(||xgrid(i)|ygrid(j)||)/2))


spgraph(hfi=1,vfi=1)
   gcontour(x=xgrid,y=ygrid,f=f,number=10)
   grtext(x=-2,y=-2,notransperent) "X"
   grtext(x=-2,y=2,notransperent) "X"
   grtext(x=2,y=-2,notransperent) "X"
   grtext(x=2,y=2,notransperent) "X"
spgraph(done)
However, RATS seems to always use x=0 to draw the text fields (see attached graph). What is it that I am missing?

Re: Text in GCONTOUR

Posted: Wed Jul 08, 2015 1:22 pm
by TomDoan
That's a bug that was fixed with version 9.

Re: Text in GCONTOUR

Posted: Fri Jul 10, 2015 4:18 am
by jonasdovern
Thanks, Tom. I am using RATS 8.3 and did not know that.