I try to plot aircraft tracks. I have a bunch of coordinates with altitude information and I want to color the segments between the points according to their altitude. See the superbly executed illustration below.
I’m aware of
-Z but as I understand it this doesn’t really help in my case.
My idea is to pass
plot a CPT and have it color the line segments accordingly. As every data point might have a different altitude associated with it I want to use the lower value of two consecutive points for choosing the color. To make things worse, in a different context I’m interested in the higher value.
Is there a way to achieve this with pure GMT?
Thank you and all the best,
Something to play with:
track_sample_data.txt (19.6 KB)
In the sample data the altitude information (z-value) is in column 3 (the first column being column 0).
#!/usr/bin/env bash gmt begin track_sample gmt plot \ -R007:24:13.64/49:01:59.90/009:54:13.64/51:01:59.90r \ -JL008:34:13.64/50:01:59.90/49:31:59.90/50:31:59.90/20c \ track_sample_data.txt -i7,6 -W0.7p,red gmt end