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/08 19:04] – [Your Task] wedge | haas:spring2018:unix:projects:gtf0 [2018/04/09 19:39] (current) – [plotting a single line] wedge | ||
---|---|---|---|
Line 25: | Line 25: | ||
For this project, we will be making use of the venerable **gnuplot** tool. Like many powerful tools we have encountered this semester, we seek only to scratch the surface, and start to familiarize ourselves with the powerful capabilities this resource offers us. | For this project, we will be making use of the venerable **gnuplot** tool. Like many powerful tools we have encountered this semester, we seek only to scratch the surface, and start to familiarize ourselves with the powerful capabilities this resource offers us. | ||
- | Following will be some usage examples to help you get a | + | 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==== | ||
+ | |||
+ | ===the data=== | ||
+ | < | ||
+ | 1.0 430 110 | ||
+ | 1.5 120 125 | ||
+ | 2.0 431 130 | ||
+ | 2.5 600 150 | ||
+ | 2.6 610 160 | ||
+ | 2.9 620 192 | ||
+ | 3.0 432 100 | ||
+ | 4.0 500 340 | ||
+ | 5.0 510 450 | ||
+ | 5.5 900 700 | ||
+ | </ | ||
+ | |||
+ | ===the gnuplot file=== | ||
+ | < | ||
+ | set title ' | ||
+ | set xlabel ' | ||
+ | set ylabel ' | ||
+ | set terminal png size 600,400 | ||
+ | |||
+ | set grid | ||
+ | set key below center horizontal noreverse enhanced autotitle box dashtype solid | ||
+ | set tics out nomirror | ||
+ | set border 3 front linetype black linewidth 1.0 dashtype solid | ||
+ | |||
+ | set xrange [0.9:5.7] | ||
+ | set xtics 1, .5, 6 | ||
+ | set mxtics 1 | ||
+ | |||
+ | set style line 1 linewidth 4 | ||
+ | set style line 2 linewidth 1 | ||
+ | set style line 3 linewidth 2 | ||
+ | |||
+ | plot ' | ||
+ | '' | ||
+ | '' | ||
+ | </ | ||
+ | |||
+ | ===generating the graph=== | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | lab46: | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | ===the graph=== | ||
+ | |||
+ | {{ 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: | ||
Line 33: | Line 186: | ||
* from the [[/ | * from the [[/ | ||
* the list of projects, the lowscore, average, median, and hiscore values of each of the evaluated projects | * the list of projects, the lowscore, average, median, and hiscore values of each of the evaluated projects | ||
- | * places these values in columns (a projects column, a lowscore column, an average column, etc.) in a **gtf0.dat** file | + | * places these values in columns (a projects column, a lowscore column, an average column, etc.) in a **gtf0.data** file |
* from your **~/ | * from your **~/ | ||
* obtains the scores and totals of each of the evaluated unix projects | * obtains the scores and totals of each of the evaluated unix projects | ||
* calculates the score (out of 100) of each individual project | * calculates the score (out of 100) of each individual project | ||
- | * places these calculated scores as a final column in your **gtf0.dat** file | + | * places these calculated scores as a final column in your **gtf0.data** file |
* constructs a **gtf0.gp** gnuplot file that: | * constructs a **gtf0.gp** gnuplot file that: | ||
* creates a graph title of "USER SEMESTER/ | * creates a graph title of "USER SEMESTER/ | ||
Line 49: | Line 202: | ||
* of a resolution of **1280x1024** | * of a resolution of **1280x1024** | ||
* set a y axis range of **-10** to **110** | * set a y axis range of **-10** to **110** | ||
- | * sets the y axis tick values to a value of **10** | + | * sets the y axis tic values to a value of **10** |
* sets a grid view | * sets a grid view | ||
* establishes a graph key, that: | * establishes a graph key, that: | ||
* shows and identifies all 5 data points (low, avg, med, hi, your scores) | * shows and identifies all 5 data points (low, avg, med, hi, your scores) | ||
* places the key NOT within the main drawing area of the graph (below and in the center would be fine) | * places the key NOT within the main drawing area of the graph (below and in the center would be fine) | ||
+ | * plots these 5 data sets as individual lines on your graph, using the projects (in the order listed) as the x-axis tic values: | ||
+ | * each line should be a different, solid color, of a minimum thickness of 2. | ||
+ | * align each plotted category against the x axis-listed project (ie pbx1 avgscore, median, etc. line up with the pbx1 tic on the x-axis). | ||
+ | * be sure that each line is identified (titled) by its category (lowscore, avgscore, median, hiscore, yourscore), especially as identified in the graph key | ||
+ | * your line should is the same, only having a greater thickness (at least 4); this should help it stand out nicely against the rest of your graph. | ||
+ | * and, plot your line last, that will cause it to draw over any lines it will intersect with | ||
+ | |||
+ | |||
+ | ====End result==== | ||
+ | What you are aiming for is a graph that strongly resembles this one: | ||
+ | |||
+ | {{ https:// | ||
+ | |||
+ | ... only it adds an additional line: YOUR actual scores on the projects. | ||
+ | |||
+ | So this graph will be a nice visual indicator of how you did in various aspects related to the class as a whole. | ||
+ | |||
+ | =====Spirit of project===== | ||
+ | The spirit of the project embodies many aspects we've been focusing on throughout the semester: | ||
+ | |||
+ | * recognizing patterns to employ effective solutions in problem solving | ||
+ | * utilizing concepts and tools covered | ||
+ | * demonstrating comprehension of concepts, tools, and problems | ||
+ | * employing concepts in knowledgeable and thoughtful manner | ||
+ | * following instructions | ||
+ | * implementing to specifications | ||
+ | * utilizing creativity | ||
+ | * being able to control solution via consistent, clear, and organized presentation | ||
+ | |||
+ | Basically: I want your solution to be the result of an honest, genuine brainstorming process where you have (on your own) figured out a path to solving the problem, you have dabbled and experimented and figured things out, and you can command the concepts and tools with a fluency enabling you to pull off such a feat. Your solution should demonstrate the real learning that took place and experience gained. | ||
+ | |||
+ | Cutting corners, avoiding work, skimping on functionality, | ||
+ | |||
+ | =====Submit===== | ||
+ | Please submit as follows: | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | Submitting unix project " | ||
+ | -> gtf0.sh(OK) | ||
+ | -> gtf0.data(OK) | ||
+ | -> gtf0.gp(OK) | ||
+ | -> gtf0.png(OK) | ||
+ | -> http:// | ||
+ | |||
+ | SUCCESSFULLY SUBMITTED | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | I'll be looking for the following: | ||
+ | |||
+ | < | ||
+ | 78: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | </ | ||
+ | Additionally: | ||
+ | * Solutions not abiding by spirit of project will be subject to a 25% overall deduction | ||
+ | * Solutions not utilizing descriptive why and how comments will be subject to a 25% overall deduction | ||
+ | * comments should be consistent in appearance (adopt a style; one that promotes readability) | ||
+ | * Solutions not utilizing indentation to promote scope and clarity will be subject to a 25% overall deduction | ||
+ | * indentation should be no fewer than 3 spaces (or 3-space tabs); I prefer 4. |