pl 'attached_data' us 1:($2<0?abs($2)*(-1.0):$2) w l
many thanx in advance
ingo
data
1 890.976
2 1.47644E-03
3 -22132.1
4 -19532.0
5 22132.0
6 19532.0
7 -0.125568
8 -5.21421E-02
9 -3.20301E-02
10 6.71634E-02
11 0.142713
12 -0.255993
13 0.448785
14 0.346983
15 0.578917
16 -0.339599
17 -9.12664
18 -4.85972
19 -9.82783
20 140.229
21 794.451
22 193.238
23 -825.706
24 -2202.26
--
ingo wardinski GeoForschungsZentrum Potsdam, in...@gfz-potsdam.de
**********************************************************************
"I did my graduate work on Mars." E. Theilig Galileo Project manager
> So, what I really would like to know is there a way to declare a
> logarithmic x-axis
Do you really mean that? I suppose you mean y-axis.
> pl 'attached_data' us 1:($2<0?abs($2)*(-1.0):$2) w l
As far as I can see this is identical to
pl 'attached_data' w l
since you attempted to plot the negative value of the absolute value in
case the value is negative. Which is a negative value.
You might get somehow what you want if you plot
pl 'attached_data' 1:($2>0?log($2):-log(-$2)) w l
but be aware of the "cruelty" you do to math :-).
Bye Petrik
--
Aidan Karley,
Aberdeen, Scotland,
Location: 57°10'11" N, 02°08'43" W (sub-tropical Aberdeen), 0.021233
**********************************************************************
echo '[dO%O+38%O+PO/d0<0]Fi22os0CC4BA64E418CE7l0xAP'|dc
AK> Oh, I should have noticed the "gfz-potsdam" in that address.
AK> Crazy geophysicists, should have stuck to hitting the rocks with
AK> a hammer. Or a ton of explosives and a drilling bit <G>.
fair point, but I'm hammering only my keyboard, no rocks.
AK> I guess I'll have to go and look at the KTB website now, to see
AK> if there's been anything since my last visit.
AK> --
AK> Aidan Karley,
AK> Aberdeen, Scotland,
AK> Location: 57°10'11" N, 02°08'43" W (sub-tropical Aberdeen), 0.021233
--
ingo wardinski GeoForschungsZentrum Potsdam, in...@gfz-potsdam.de
**********************************************************************
"It's your money. You paid for it." George W. Bush
LaCrosse, Wis., Oct. 18, 2000
Let's forget "looks", and discuss rationales instead. Given the fact
they're completely unsuited for being interpreted that way, what on
earth makes you want to plot these data on a log scale? Note that
with the suggested "fix"
plot 'data' using 1:($2>0?log($2):-log(-$2))
your plot would display both y = -1000.0 and y = +0.001 as identical
"-3" --- I strongly doubt that's what you wanted.
The only sane way of plotting these data with a log y axis I can see
would be to split the dataset into one for the negative y values and
one for the positive, e.g. like this:
plot 'data' using 1:($2>0:$2:0/0) title 'y>0', \
'' using 1:($2<0?-$2:0/0) title 'y<0'
Or you could use multiplot mode to put them into separate diagrams,
one with an upward log y axis for the positive y values, the other
with a downward log axis used for the negative values only.
--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.