# -*- gnuplot -*- # # EM1.gpt -- plots Q(\theta,\thetahat) for coin experiment # with nheads, ntails, and ns hidden. # # Used in algorithms.tex, fig:EM # # # Copyright (c) 2005, 2007, 2008 Andrew Fraser # This file is part of HMM_DS_Code. # # HMM_DS_Code is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # HMM_DS_Code is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # set terminal epslatex monochrome dashed "default" 9 set output "`echo -n $GP_OUTPUT`" set size 0.49,0.65 nheads = 1 ntails = 1 ns = 2 Q(theta, thetahat) = (nheads + (ns * theta)) * log(thetahat) \ + (ntails + (ns * (1 - theta))) * log(1 - thetahat) set xrange [0.1:0.9] set format x '\x{%2.1f}' set xtics 0.2,0.2,0.8 set xlabel '\xlab' set yrange [0.1:0.9] set format y '\y{%2.1f}' set ytics 0.1,0.3,0.9 set ylabel '\ylab' set zrange [-8:-2] set format z '$%g$' set ztics -8,2,-2 set zlabel '\zlab' 4,5 set isosamples 20, 20 set view 60, 330 set contour # set cntrparam levels incremental -8, 0.1, -2.2 set cntrparam levels auto 30 set nokey set hidden3d unset clabel set cntrparam bspline splot Q(x, y) set output