2008/08/23

gnuplot

Wow, I did not know how easy gnuplot is.
See http://people.ku.edu/~syliu/shredderyin/gnuplot-doc/TOC.html .

The obvious test case:
gnuplot> lg(x) = log(x)/log(2)
gnuplot> hh(x) = ((x==0) || (x==1)) ? 0 : - x * lg(x) - (1-x) * lg(1-x)
gnuplot> set samples 100
gnuplot> plot [0:1] hh(x)