Hi Emile,
I will just list some ideas that may help you find some answers
This FAQ gives an example that may help you: "Overlaying symbols on a
time-axis plot", at
http://www.ferret.noaa.gov/Ferret/FAQ/custom_plots/time_series_symbol_overlay.html
Creating a variable from the time axis is a helpful way of getting the
time coordinates
you need. In addition to T[gt=axisname], you might also want the
pseudovariables
TBOXLO or TBOXHI.
Also, the results of the RETURN keyword are often helpful when writing
a script.
These kinds of commands may give you what you need:
yes? DEFINE SYMBOL axname = `var,return=taxis`
yes? DEFINE SYMBOL time1 = `var,return=tstart`
yes? LET tt = t[gt=var]
yes? LET t1 = tt[t=($time1)]
Ansley Manke
Emilie Vanvyve wrote:
Hello !
I have another time-axis problem to submit to you ... ;o)
The original problem is : I try to draw a simple line (as a legend) on
a plot which has pressure for y-axis and time for x-axis. I try to
draw that line not with the ALINE command (because it does not work in
version 5.6 : I can not get a line plotted on my graph), but with the
PLOT/OVER/.../VS/LINE {x1,x2}, {y1,y2} (which allows a greater liberty
for the line style).
So, I need x1, x2, y1 and y2 in user units. As
it is inside a series of automatic scripts, I would really prefer not
to have to set those coordinates by hand.
It's ok and easy to get y1 and y2 for the y-axis, but not at all for
the x-axis which is a time axis in my case.
This time axis is from 21/11/1993 0h to 1/12/1993 0h and is defined
automatically from my data (I mean I do not define any new time axis
or do not make any regridding — and I do not want to !).
The problem I have is that I do not understand the value given by
XAXIS_MIN and XAXIS_MAX for my time axis and that I can not convert
the values I get in numbers of hours since the x january 1901 (which
seem to be the values I need to plot my line in the right place on the
plot).
Here are more details. For my time axis, I have :
XAXIS_MIN = 8764 (21/11/1993 0h)
XAXIS_MAX = 9004 (01/12/1993 0h)
Those values, Ferret does not understand them and so does not draw the
line where I want it to do. I should normally have something like
813888 for the 21/11/1993 0h and 814128 for the 01/12/1993 0h (=
number of hours since the x january 1901).
I have tried to understand where do XAXIS_MIN/MAX values come from.
So :
XAXIS_MAX - XAXIS_MIN = 240 = 24 hours * 10 days
(which sounds logical and means to me that my time axis unit = hours)
(my data = "" 6 hours)
>From this result, I have tried to discover to which date would
correspond a XAXIS_MIN = 1. It seems to be (according above) the
21/11/1992 0h (because 8764 / 24 = 365,1 days). I begin to be lost ...
Anyway, it does not help me very much. On another hand, a colleague of
mine got XAXIS_MIN = 8761 for the 15/05/1990 0h and 12049 for the
29/09/1990 0h (with same kind of data) ... I'm lost !
So, how could I simply get these values (813888 and 814128) ? (if
possible, automatically and through a variable)
Or, how to transform the XAXIS_MIN and XAXIS_MAX values into the ones
here above ? (without too many computes, this script is just assumed
to draw a line ...)
And can anyone tell me how Ferret computes its time database ??
I would be glad to have any answer to those questions :o) !!
Thanks in advance !!
Best regards,
Emilie V.
____________________________________________________________
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
|