to draw a rectangle

Jose Fernando Pesquero pesquero at CPTEC.INPE.BR
Thu Mar 27 07:10:36 EDT 2008


Eduardo,

You are using wrong values to the subwrd index.

nx0 = subwrd(result,1)
ny0 = subwrd(result,2)

Try it

nx0 = subwrd(result,3)
ny0 = subwrd(result,6)

use the command

say result

after any query command, to see better, the returns of this command

You´ll need to change nx1,ny1 in the same way.

Regards

Pesquero
> Hello Dear Grads' Users
>
> I am trying to draw a rectangle doing as follows:
>
> 'set gxout contour'
> 'set cthick 20'
> 'set cint 5.0'
> 'set ccolor 1'
> 'd hgtcom-hgtc'
>
> x0=-65
> y0=-28
> x1=-70
> y1=-38
> 'q w2xy 'x0' 'y0
> nx0 = subwrd(result,1)
> ny0 = subwrd(result,2)
> 'q w2xy 'x1' 'y1
> nx1 = subwrd(result,1)
> ny1 = subwrd(result,2)
>
> 'draw rec 'nx0' 'ny0' 'nx1' 'ny1
>
> But it doesn't work!
> What's wrong?
>
> Thanks in advance.
>
> Eduardo.
>
>



More information about the gradsusr mailing list