User Tools

Site Tools


haas:spring2018:unix:projects:gtf0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:spring2018:unix:projects:gtf0 [2018/04/09 15:51] – [plotting lines] wedgehaas:spring2018:unix:projects:gtf0 [2018/04/09 19:39] (current) – [plotting a single line] wedge
Line 51: Line 51:
 set terminal png size 600,400 set terminal png size 600,400
  
-set grid 
 unset key unset key
 set tics out nomirror set tics out nomirror
Line 68: Line 67:
  
 <cli> <cli>
-lab46:~/src/gtf0$ gnuplot lines.gp > ~/public_html/gtf0/line.png+lab46:~/src/gtf0$ gnuplot line.gp > ~/public_html/gtf0/line.png
 lab46:~/src/gtf0$ chmod 0604 ~/public_html/gtf0/line.png lab46:~/src/gtf0$ chmod 0604 ~/public_html/gtf0/line.png
 lab46:~/src/gtf0$ # view line.png in web browser lab46:~/src/gtf0$ # view line.png in web browser
Line 108: 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 131: Line 128:
  
 {{  http://lab46.g7n.org/~wedge/lines.png  |lines graph}} {{  http://lab46.g7n.org/~wedge/lines.png  |lines graph}}
 +
 +====plotting a histogram====
 +
 +===the data===
 +<code>
 +march 5 55 20 30 40
 +april 6 35 40 30 55
 +may   7 45 50 60 70
 +</code>
 +
 +===the gnuplot file===
 +<code>
 +set title 'Histogram'
 +set xlabel 'x'
 +set ylabel 'y'
 +
 +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 '#0060ad' linetype 1 linewidth 2
 +
 +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 'histogram.data' using 2:xtic(1) title 'cactus', \
 +        '' using 3 title 'maple', \
 +        '' using 4 title 'willow', \
 +        '' using 5 title 'birch'
 +</code>
 +
 +===generating the graph===
 +
 +<cli>
 +lab46:~/src/gtf0$ gnuplot histogram.gp > ~/public_html/gtf0/histogram.png
 +lab46:~/src/gtf0$ chmod 0604 ~/public_html/gtf0/histogram.png
 +lab46:~/src/gtf0$ # view histogram.png in web browser
 +</cli>
 +
 +===the graph===
 +
 +{{  http://lab46.g7n.org/~wedge/histogram.png  |histogram graph}}
 =====Your Task===== =====Your Task=====
 Your task for this project is as follows: Your task for this project is as follows:
haas/spring2018/unix/projects/gtf0.1523289091.txt.gz · Last modified: 2018/04/09 15:51 by wedge