I would like to plot relative simple x-y graphs,
where the input data gives times strings in a defined
format
as x-values.
Example for x values could be:
2002-02-27-13:42:25
or
27/02/02 13:42
Is there any possibility to give this data directly to
gri?
It would be no problem to define the format as
YYYMMDDhhmmss, but the values - without manipulation -
would not fit right on a linear scaled x-axis.....
Are plots along a time axis not rather common?
What the best way to handle this with gri?
Thanks for hints and help,
Johanna
Logged In: YES
user_id=31559
Hi. I just ran across this request by accident ... guess
I'm not monitoring this!
Gri has no ability to handle time-data. I know it would be
useful, but it's also rather hard since it would have to
handle many input formats, and would have to be pretty
clever about displaying the data on axes.
On the data-reading side of things, the best scheme is to
make gri open a "pipe" to a system command that can
understand dates. For example, the Perl language has a date
manipulation package. The idea would be to use Perl to
convert your times into seconds/hours/days/years since some
start-time, or whatever. Then Gri could handle it easily.
On the axis-drawing side, things are really a lot more
complicated. There are many possibilities, depending on the
span of the data, and the choice of the user. The best
thing would be for Gri to be flexible enough to let the user
do whatever is desired (label with day-of-week, or
month-of-year, or new-moon symbols, ...), and I'm working
towards that.
The short answer, however, is "no". Gri has no ability to
work with time-data.
By the way, you mention that time data are common. In my
field, so are latitude/longitude data. In fact, a lot of
the graphs I make need special lat/long axes. As it turns
out, there are special ways of encoding geographical
locations, as well. So that's yet another special format
that gri might/should handle simply.
Thanks for the good suggestion!
Dan.
Logged In: YES
user_id=31559
This is partly addressed (in terms of axis-label
representation) by the new "set x|y axis labels" command,
available on the CVS stream right now ... see the discussion
forum.
Logged In: YES
user_id=31559
I have been doing this in the R language a lot lately, and I intend to build it into
gri. It will be a little complicated, though, since the storage type for vectors in
Gri is "double", and to do times properly I think it is best to use "long int" (I
don't want to invent a wobbly wheel, so I'll copy R in however it does things,
whether "long int" or otherwise). So I'll have to make a union type. This is not
difficult in principle but there are a lot of fiddly details. If this does appear, it
will be in gri 3.x, not 2.x.