Hi Emile,
The lists of numbers in bx and by do not tell Ferret that they
are longitudes and latitudes. So Ferret does not know to apply
a "modulo" operation to convert -17 to (360-17) and put it at the
right location on the plot. You can easily do the modulo operation
yourself on the values in bx:
let modbx = if bx lt 0 then 360+bx else bx
polygon/line/over modbx, by
Emilie Vanvyve wrote:
Hello,
Thanks for the answers I got to my Friday questions! With them, I
could finally find an "enough-simple-according-to-me" way to solve my
little problem (I agree it is indeed easier to write to/read from a
file).
But I now encounter another one when I use POLYGON when a region has
been defined: the polygon is not plotted as soon as I restrict the x
and/or y-axis values (with: set region, /x=...:..., /y=...:...),
otherwise it is plotted.
It may be comprehensible, but I do not know how to put up with that.
Briefly, I do within a script:
set
region/x=31.7W:33.7E/y=32.5N:64.9N !Europe instead of whole world
shade my_var
polygon/line/over bx,by
or
shade/x=31.7W:33.7E/y=32.5N:64.9N
my_var !Europe instead of whole world
polygon/line/over bx,by
where bx and by are both 1-D arrays, containing resp. longitude and
latitude values of a shape I wish to draw on the plot.
They are e.g. (read from the box.dat file):
yes? list bx, by
DATA SET: ./box.dat
X: 0.5 to 348.5
Column 1: BX
Column 2: BY
BX BY
1 / 1: -17.00 32.53
2 / 2: -17.08 32.87
3 / 3: -17.17 33.21
4 / 4: -17.26 33.55
5 / 5: -17.35 33.89
...
344 / 344: -15.38 32.81
345 / 345: -15.78 32.74
346 / 346: -16.19 32.67
347 / 347: -16.59 32.60
348 / 348: -17.00 32.53
I suspect the problem to be directly linked to the restriction I
impose on x and/or y-axis values, when I define the region. Those
restrictions might in fact be also applied to bx and by. Their index 1
to 348 seem to be understood as longitudes.
I tried to give the bx and by values according another axis:
polygon/line/over
zsequence(bx), zsequence(by)
but it did not work.
What's the solution...?
Thanks in advance for any suggestion!
Emilie
____________________________________________________________
Emilie VANVYVE
Physicist, PhD student
Université catholique de
Louvain (UCL)
Institut d'astronomie et de géophysique G. Lemaître (ASTR)
Chemin du Cyclotron, 2
1348 Louvain-la-Neuve (Belgium)
Phone : +32-(0)10-473300
Fax : +32-(0)10-474722
E-mail : vanvyve@astr.ucl.ac.be
Web : www.astr.ucl.ac.be
|