#   Gnuplot script for Political Compass graphs
#   Copyright (C) 2008 Michael Gorven
#   
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Affero General Public License as
#   published by the Free Software Foundation, either version 3 of the
#   License, or (at your option) any later version.
#   
#   This program 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 Affero General Public License for more details.
#   
#   You should have received a copy of the GNU Affero General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.

set xrange[-10:10]
set yrange[-10:10]
set xzeroaxis
set yzeroaxis
set timestamp

set label "Left" at -10,0 left offset 2,0 font 'VeraBd,12'
set label "Right" at 10,0 right offset -2,0 font 'VeraBd,12'
set label "Libertarian" at 0,-10 center offset 0,1 font 'VeraBd,12'
set label "Authoritarian" at 0,10 center offset 0,-1 font 'VeraBd,12'

set style rectangle back fillstyle solid noborder
set object rect from 0,0 to 10,10 fc rgb "#42aaff"
set object rect from 0,0 to 10,-10 fc rgb "#c09aea"
set object rect from 0,0 to -10,-10 fc rgb "#9aed97"
set object rect from 0,0 to -10,10 fc rgb "#ff7575"

#set xtics border out
#set ytics border out
set grid xtics ytics front
unset key

set terminal svg size 600,600 dynamic font 'Vera,8'
set output '/home/mgorven/public_html/clug-political.svg'
plot    '/home/mgorven/public_html/clug-political.txt' using 1:($2-0.3):3 with labels, \
        '/home/mgorven/public_html/clug-political.txt' using 1:2 lc rgb "red"

set terminal png font 'Vera' 8 size 600,600 transparent
set output '/home/mgorven/public_html/clug-political.png'
replot
