This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:spring2018:unix:projects:gtf0 [2018/04/09 15:45] – [Your Task] wedge | haas:spring2018:unix:projects:gtf0 [2018/04/09 19:39] (current) – [plotting a single line] wedge | ||
---|---|---|---|
Line 26: | Line 26: | ||
Following will be some usage examples to help you get a feel for how to use the tool (barely scratching the surface of what it can do): | Following will be some usage examples to help you get a feel for how to use the tool (barely scratching the surface of what it can do): | ||
+ | |||
+ | ====plotting a single line==== | ||
+ | |||
+ | ===the data=== | ||
+ | < | ||
+ | 1.0 430 | ||
+ | 1.5 120 | ||
+ | 2.0 431 | ||
+ | 2.5 600 | ||
+ | 2.6 610 | ||
+ | 2.9 620 | ||
+ | 3.0 432 | ||
+ | 4.0 500 | ||
+ | 5.0 510 | ||
+ | 5.5 900 | ||
+ | </ | ||
+ | |||
+ | ===the gnuplot file=== | ||
+ | < | ||
+ | set title ' | ||
+ | set xlabel ' | ||
+ | set ylabel 'y (1/ | ||
+ | |||
+ | set terminal png size 600,400 | ||
+ | |||
+ | unset key | ||
+ | set tics out nomirror | ||
+ | set border 3 front linetype black linewidth 1.0 dashtype solid | ||
+ | |||
+ | set xrange [1:5] | ||
+ | set xtics 1, .5, 5 | ||
+ | set mxtics 1 | ||
+ | |||
+ | set style line 1 linecolor rgb '# | ||
+ | |||
+ | plot ' | ||
+ | </ | ||
+ | |||
+ | ===generating the graph=== | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | lab46: | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | ===the graph=== | ||
+ | |||
+ | {{ http:// | ||
====plotting lines==== | ====plotting lines==== | ||
Line 58: | Line 107: | ||
set xtics 1, .5, 6 | set xtics 1, .5, 6 | ||
set mxtics 1 | set mxtics 1 | ||
- | |||
- | set for [i=1:8] linetype i dashtype i | ||
set style line 1 linewidth 4 | set style line 1 linewidth 4 | ||
Line 81: | Line 128: | ||
{{ http:// | {{ http:// | ||
+ | |||
+ | ====plotting a histogram==== | ||
+ | |||
+ | ===the data=== | ||
+ | < | ||
+ | march 5 55 20 30 40 | ||
+ | april 6 35 40 30 55 | ||
+ | may 7 45 50 60 70 | ||
+ | </ | ||
+ | |||
+ | ===the gnuplot file=== | ||
+ | < | ||
+ | set title ' | ||
+ | set xlabel ' | ||
+ | set ylabel ' | ||
+ | |||
+ | set terminal png size 600,400 | ||
+ | |||
+ | set grid | ||
+ | set tics out nomirror | ||
+ | set border 3 front linetype black linewidth 1.0 dashtype solid | ||
+ | |||
+ | set xrange [-1:3] | ||
+ | set xtics 1 | ||
+ | |||
+ | set yrange [0:80] | ||
+ | |||
+ | set style line 1 linecolor rgb '# | ||
+ | |||
+ | set style histogram clustered gap 1 title offset character 0, 0, 0 | ||
+ | set style data histograms | ||
+ | |||
+ | set boxwidth 1.0 absolute | ||
+ | set style fill solid 5.0 border -1 | ||
+ | |||
+ | plot ' | ||
+ | '' | ||
+ | '' | ||
+ | '' | ||
+ | </ | ||
+ | |||
+ | ===generating the graph=== | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | lab46: | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | ===the graph=== | ||
+ | |||
+ | {{ http:// | ||
=====Your Task===== | =====Your Task===== | ||
Your task for this project is as follows: | Your task for this project is as follows: |