OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-learn / learn-lang-diary / en-sims-p3 / mi-scatter.gplot

93 lines · gplot ref:
# set term png small color

#################################################
## Used to generate the standard Zipf distribution graph.
##
#set term png size 1024,768
#set out 'rank-count.png'
##set term postscript eps enhanced color 24
##set out 'rank-count.eps'
#set logscale x
#set format x "10^{%L}"
#set format y "10^{%L}"
#set logscale y
#set key right top
#set title "Word Rank vs. Word Count"
#set ylabel "Observation Count"
#set xlabel "Rank by Observation Count"
#plot "rank-mi-scatter.dat" using 1:3 with lines title "data", \
#     "rank-mi-scatter.dat" using 1:(3e6/$1**1.1) with lines lw 2 title "(rank)^{-1.1}", \
#     "rank-mi-scatter.dat" using 1:(1e7/$1**1.4) with lines lw 2 title "(rank)^{-1.4}"
#
#################################################
## Used to generate the ranked MI scatterplot
##
#set term png
#set out 'rank-mi-scatter.png'
##set term postscript eps enhanced color 24
##set out 'rank-mi-scatter.eps'
#set logscale x
#set format x "10^{%L}"
#unset logscale y
#unset format y
#set key left bottom
#set title "Word Rank vs. self-MI"
#set ylabel "Self-MI"
#set xlabel "Rank by Observation Count"
#plot "rank-mi-scatter.dat" using 1:4 with points title ""
#
#################################################
## Used to generate the ranked support scatterplot
##
#set term png
#set out 'rank-support-scatter.png'
##set term postscript eps enhanced color 24
##set out 'rank-support-scatter.eps'
#set logscale x
#set format x "10^{%L}"
#set logscale y
#set format y "10^{%L}"
#set key right top
#set title "Word Rank vs. Support"
#set ylabel "Support"
#set xlabel "Rank by Observation Count"
#plot "rank-mi-scatter.dat" using 1:5 with points title "", \
#     "rank-mi-scatter.dat" using 1:(6e5/$1**1.1) with lines lw 2 title "(rank)^{-1.1}"
#
#################################################
# Used to generate the support-ranked MI scatterplot
#
#set term png
#set out 'sup-rank-mi-scatter.png'
## set term postscript eps enhanced color 24
## set out 'sup-rank-mi-scatter.eps'
#set logscale x
#set format x "10^{%L}"
#unset logscale y
#unset format y
#set key left bottom
#set title "Word Rank vs. self-MI"
#set ylabel "Self-MI"
#set xlabel "Rank by Support"
#plot "sup-rank-mi-scatter.dat" using 1:4 with points title ""

#################################################
# Used to generate the ratio vs MI scatterplot
#
# set term png
# set out 'ratio-mi-scatter.png'
set term postscript eps enhanced color 24
set out 'ratio-mi-scatter.eps'
set logscale x
set format x "10^{%L}"
unset logscale y
unset format y
# set xrange [1e-4:1]
set key left bottom
set title "Support/Count Ratio vs. self-MI"
set ylabel "Self-MI"
set xlabel "Support / Count"
plot "rank-mi-scatter.dat" using ($5/$3):4 with points title ""

#################################################