Difference between revisions of "Student-solutions/Leif"

From Earlham CS Department
Jump to navigation Jump to search
Line 1: Line 1:
 
=GNUPlot Visualization=
 
=GNUPlot Visualization=
** [[Media:gnuplot-one-leif.pdf|PDF]]
+
* [[Media:gnuplot-one-leif.pdf|PDF]]
** [[Media:gnuplot-one-leif.svg|SVG]]
+
* [[Media:gnuplot-one-leif.svg|SVG]]
 
=Datasets=
 
=Datasets=
** [[Media:gnuplot-one-leif-datasets.zip|ZIP]]
+
* [[Media:gnuplot-one-leif-datasets.zip|ZIP]]
 
=Code=
 
=Code=
 
<code>
 
<code>

Revision as of 21:07, 29 October 2012

GNUPlot Visualization

Datasets

Code

  1. GNUPlot Visualization - Mapping the Population of India
  2. Leif DeJong
  3. F/K Fall 2012

PRINT_TYPE = "pdf"

  1. Export Settings
    1. PDF

set terminal postscript enhanced color set output '| ps2pdf - plot.pdf'

    1. SVG
  1. set terminal svg
  2. set output 'india-population.svg'
  1. Functions

WordSize(size) = 0.25*sqrt(sqrt(column(size))) Place(String,Size) = sprintf("{/=%d %s}", WordSize(Size), stringcolumn(String))

  1. Reset

unset xtics unset ytics unset key unset log unset label

  1. Pre Plot Setup

set termoption enhanced set object 1 rectangle from screen 0,0 to screen 1,1 fillcolor rgb"#4282d3" behind set border 0 set size square set datafile separator "," set label "Yield Point" at 1,0

  1. Plot

plot 'india.csv' using 2:1 w filledcu lc rgb "#138900" replot 'middle-andaman.csv' using 2:1 w filledcu lc rgb "#138900" replot 'little-anadman.csv' using 2:1 w filledcu lc rgb "#138900" replot 'great-nicobar.csv' using 2:1 w filledcu lc rgb "#138900" replot 'amini.csv' using 2:1 w filledcu lc rgb "#138900" replot 'andrott.csv' using 2:1 w filledcu lc rgb "#138900" replot 'other.csv' using 2:1 w filledcu lc rgb "#138900" replot 'other2.csv' using 2:1 w filledcu lc rgb "#138900" replot 'other3.csv' using 2:1 w filledcu lc rgb "#138900" replot 'india-information.csv' using 29:28:(Place(1,5)) with labels title 'India' reset