Difference between revisions of "Student-solutions/Leif"
Jump to navigation
Jump to search
Line 37: | Line 37: | ||
set size square | set size square | ||
set datafile separator "," | set datafile separator "," | ||
− | |||
# Plot | # Plot | ||
− | plot 'india.csv' using 2:1 w | + | plot 'india.csv' using 2:1 w filledcurves lc rgb "#138900" |
− | replot 'middle-andaman.csv' using 2:1 w | + | replot 'middle-andaman.csv' using 2:1 w filledcurves lc rgb "#138900" |
− | replot 'little-anadman.csv' using 2:1 w | + | replot 'little-anadman.csv' using 2:1 w filledcurves lc rgb "#138900" |
− | + | replot 'amini.csv' using 2:1 w filledcurves lc rgb "#138900" | |
− | replot 'amini.csv' using 2:1 w | + | replot 'andrott.csv' using 2:1 w filledcurves lc rgb "#138900" |
− | replot 'andrott.csv' using 2:1 w | + | replot 'other.csv' using 2:1 w filledcurves lc rgb "#138900" |
− | replot 'other.csv' using 2:1 w | + | replot 'other2.csv' using 2:1 w filledcurves lc rgb "#138900" |
− | replot 'other2.csv' using 2:1 w | + | replot 'other3.csv' using 2:1 w filledcurves lc rgb "#138900" |
− | replot 'other3.csv' using 2:1 w | ||
replot 'india-information.csv' using 29:28:(Place(1,5)) with labels title 'India' | replot 'india-information.csv' using 29:28:(Place(1,5)) with labels title 'India' | ||
reset | reset | ||
</pre> | </pre> |
Revision as of 21:35, 29 October 2012
GNUPlot Visualization
Datasets
Code
# GNUPlot Visualization - Mapping the Population of India # Leif DeJong # F/K Fall 2012 PRINT_TYPE = "pdf" # Export Settings ## PDF set terminal postscript enhanced color set output '| ps2pdf - plot.pdf' ## SVG #set terminal svg #set output 'india-population.svg' # Functions WordSize(size) = 0.25*sqrt(sqrt(column(size))) Place(String,Size) = sprintf("{/=%d %s}", WordSize(Size), stringcolumn(String)) # Reset unset xtics unset ytics unset key unset log unset label # 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 "," # Plot plot 'india.csv' using 2:1 w filledcurves lc rgb "#138900" replot 'middle-andaman.csv' using 2:1 w filledcurves lc rgb "#138900" replot 'little-anadman.csv' using 2:1 w filledcurves lc rgb "#138900" replot 'amini.csv' using 2:1 w filledcurves lc rgb "#138900" replot 'andrott.csv' using 2:1 w filledcurves lc rgb "#138900" replot 'other.csv' using 2:1 w filledcurves lc rgb "#138900" replot 'other2.csv' using 2:1 w filledcurves lc rgb "#138900" replot 'other3.csv' using 2:1 w filledcurves lc rgb "#138900" replot 'india-information.csv' using 29:28:(Place(1,5)) with labels title 'India' reset