gmt
gmt copied to clipboard
Let -Ra works for log graph.
If I use -Ra I could get values that are not compatible for a logarithmic graph as in the example below.
gmt begin test png
gmt math -T0/10240/1 T 10240 DIV 360 MUL 400 MUL COSD = t.txt
gmt spectrum1d t.txt -S256 -W --GMT_FFT=brenner -N -i1 > pow5.txt
gmt plot pow5.txt -Wgreen -Re -JX-15cl/4c -Bxa2f3 -Bya -Vi
gmt plot pow5.txt -Wgreen -Ra -JX-15cl/4c -Bxa2f3 -Bya -Vi -Yh+1c
gmt end #show
rm t.txt pow5.txt
For the -Re I got -R2/256/1.44309083861e-16/85.3334737947.
For the -Ra I got -R0/260/-2/86 which is not compatible with a log graph.
I don't think it is very important and I don't need it (for now).
I see. There are two problems:
- This all happens before we parse common options so we would have to check the -J option string and figure out it is -Jx or -JX and if there is a trailing l and if there are slashes to indicate log10 for only one dimension. Not too hard.
- Assuming we know we are dealing with a log10 axis, we need to replace the current "find a reasonable lower and higher value" with something based on powers of 10, probably.
Ok. I see.
What if we add a modifier (-Ra+l) to indicate that we will work with log data. I think it will easier.
Sort of defeats the purpose of saving the user from making decisions. I think I can fix this so it works well (soon)