| 1 | = HOWTO: Stacked Plots with Gnuplot = |
| 2 | |
| 3 | If you want to generate stacked plots with Gnuplot like this... |
| 4 | |
| 5 | [[Image(http://gibuu.physik.uni-giessen.de/GiBUU/chrome/site/files/DummyGnuplot.png)]] |
| 6 | |
| 7 | ...you find here the corresponding script: |
| 8 | |
| 9 | {{{ |
| 10 | reset |
| 11 | |
| 12 | set yrange [-0.5:1.5] |
| 13 | set xrange [0:10] |
| 14 | set xtics 0,2,9 |
| 15 | set ytics -0.4,0.2,1.2 |
| 16 | |
| 17 | set lmargin 0 |
| 18 | set bmargin 0 |
| 19 | set tmargin 0 |
| 20 | set rmargin 0 |
| 21 | |
| 22 | |
| 23 | unset bars |
| 24 | |
| 25 | set terminal postscript eps enhanced color 'Helvetica' 24 size 5,5 |
| 26 | set output "Dummy.eps" |
| 27 | |
| 28 | set multiplot layout 3,4 scale 1,1 offset 0.5,0 |
| 29 | |
| 30 | |
| 31 | |
| 32 | set format x "" |
| 33 | |
| 34 | set format y |
| 35 | set ylabel " " |
| 36 | set label 1 "{/=18 Plot 1}" at graph 0.92, graph 0.92 right |
| 37 | plot sin(x*1) t "" |
| 38 | |
| 39 | set format y "" |
| 40 | set ylabel " " |
| 41 | |
| 42 | set label 1 "{/=18 Plot 2}" at graph 0.92, graph 0.92 right |
| 43 | plot sin(x*2) t "" |
| 44 | |
| 45 | set label 1 "{/=18 Plot 3}" at graph 0.92, graph 0.92 right |
| 46 | plot sin(x*3) t "" |
| 47 | |
| 48 | set label 1 "{/=18 Plot 4}" at graph 0.92, graph 0.92 right |
| 49 | plot sin(x*4) t "" |
| 50 | |
| 51 | set format y |
| 52 | set ylabel "y-label" |
| 53 | set label 1 "{/=18 Plot 5}" at graph 0.92, graph 0.92 right |
| 54 | plot sin(x*5) t "" |
| 55 | |
| 56 | set format y "" |
| 57 | set ylabel " " |
| 58 | set label 1 "{/=18 Plot 6}" at graph 0.92, graph 0.92 right |
| 59 | plot sin(x*6) t "" |
| 60 | |
| 61 | set label 1 "{/=18 Plot 7}" at graph 0.92, graph 0.92 right |
| 62 | plot sin(x*7) t "" |
| 63 | |
| 64 | set label 1 "{/=18 Plot 8}" at graph 0.92, graph 0.92 right |
| 65 | plot sin(x*8) t "" |
| 66 | |
| 67 | |
| 68 | set format x |
| 69 | set xlabel " " |
| 70 | set format y |
| 71 | set ylabel " " |
| 72 | set label 1 "{/=18 Plot 9}" at graph 0.92, graph 0.92 right |
| 73 | plot sin(x*9) t "" |
| 74 | |
| 75 | |
| 76 | set xlabel "x-label" offset graph 0.5, 0 |
| 77 | set format y "" |
| 78 | set ylabel " " |
| 79 | set label 1 "{/=18 Plot 10}" at graph 0.92, graph 0.92 right |
| 80 | plot sin(x*10) t "" |
| 81 | |
| 82 | set xlabel " " |
| 83 | set label 1 "{/=18 Plot 11}" at graph 0.92, graph 0.92 right |
| 84 | plot sin(x*11) t "" |
| 85 | |
| 86 | set xlabel " " |
| 87 | set label 1 "{/=18 Plot 12}" at graph 0.92, graph 0.92 right |
| 88 | plot sin(x*12) t "" |
| 89 | |
| 90 | unset multiplot |
| 91 | |
| 92 | set output |
| 93 | set terminal x11 |
| 94 | |
| 95 | }}} |