-
-
Save oioki/e83b9cf9514be17216ffc8ee64aa012f to your computer and use it in GitHub Desktop.
Gnuplot altitude/temperature graph
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/gnuplot | |
set terminal png font './LiberationSans-Regular.ttf' 15 size 1600,900 | |
set grid | |
set xlabel '' | |
set format x '' | |
set ylabel 'Altitude, m' tc lt 1 | |
set ytics 1000 nomirror tc lt 1 | |
set y2label 'Temperature, °C' tc lt 2 | |
set y2tics 10 nomirror tc lt 2 | |
set datafile separator ',' | |
feet_to_meters(x) = x * 0.3048 | |
set output 'temperature.png' | |
plot 'data.csv' using (feet_to_meters($1)) with lines lw 2 axes x1y1 notitle, \ | |
'data.csv' using 3 with lines lw 2 axes x1y2 notitle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment