Re:Basic Scripting with Awk and Gnuplot
by dan-robertson on Thursday January 21, 2021 @08:18PM
(#25867020)
Beware when piping awk | gnuplot or especially awk | awk: when printing numbers, awk by default prints them with something like %.6g, which can lose important amounts of precision. There are two ways this can happen. Firstly when numbers are implicitly converted to strings, eg for concatenation; and secondly when they are printed directly. These conversations are controlled by two different variables which may be set to printf directives to get higher precision.
Re:Basic Scripting with Awk and Gnuplot
by andrepd on Thursday January 21, 2021 @07:14PM
(#25866570)
Some problems: the colours are not that great, and also not colourblind-safe. And most grating of all: why are the tics light gray and not black! It's very hard to read.
Re:Basic Scripting with Awk and Gnuplot
by hatmatrix on Friday January 22, 2021 @05:58AM
(#25870542)
Just curious but why go for gnuplot (and awk) rather than python or R? At some point you run up to some limit where you want a bit more capability. I don't know that the learning curve is that much less for awk + gnuplot?
Re:Basic Scripting with Awk and Gnuplot
by leephillips on Friday January 22, 2021 @08:35AM
(#25871506)
Gnuplot (and awk) have several advantages. It’s faster, especially for large datasets; it’s language-independent and can be used through pipes with any language, so the plotting solution you develop can go with you as you change your simulation language; it’s designed to be automated, plot over the network, etc.
Very succinct quickstart guide.
Can anyone point to some pretty styles they've come across?
Here is one I used a while ago: Pretty Plots with Gnuplot [0]
[0]: https://edg.uchicago.edu/tutorials/pretty_plots_with_gnuplot...
I find it best to restrict the use -v to injecting environment variables into my awk scripts.