reset set terminal windows set terminal png size 640,480 year='2017' input = 'files/noaa_'.year.'_gnu.txt' print input out=1 # 0 windows # 1 jpg # 2 pdf #------------------------------------- if (out==0) { print '----> Output: Windows' set terminal windows } #------------------------------------- if (out==1) { print '----> Output: jpg' set terminal png size 640,480 outfile = year.'_niederschlag.jpg' print outfile set output outfile } #------------------------------------- if (out==2) { print '-----> Output: pdf ' set terminal pdf size 6,3.5 outfile = 'pdf/'.year.'_niederschlag.pdf' print outfile set output outfile } #------------------------------------- #outfile = year.'_niederschlag.jpg' #print year.".jpg" #print outfile #set output outfile #set terminal pdf size 6,3.5 #print year.'_'.mon.'.pdf' #set output 'pdf/'.year.'_niederschlag.pdf' set size 1,1 set origin 0.02,0.02 set xrange [0.5:12.5] set yrange [-5:69.9] set y2range [-9.8:139.8] set y2tics -10,10,140 textcolor "blue" font ",14" set xtics 1,1,12 font ",14" set ytics -20,5,100 font ",14" set grid noxtics set grid ytics lw 1 lt 0 lc rgb "#000000" set ylabel "Lufttemperatur / °C" font ",20" set y2label "Niederschlag / mm" textcolor "blue" font ",20" set xlabel "Monat" font ",20" set label year font ",25" at graph 0.45, graph 0.92 set label "Gymnasium" font ",18" at graph 0.03, graph 0.95 set label "Sulingen" font ",18" at graph 0.03, graph 0.89 set style line 1 lt 1 lc rgb "red" lw 2 set style line 2 lt 1 lc rgb "blue" lw 2 set style line 3 lt 1 lc rgb "black" lw 2 inputa = 'files/noaa_'.year.'_niederschlag_gnu.txt' print inputa set boxwidth 0.50 relative set style fill transparent solid 0.5 noborder set key font ",10" samplen 3 spacing 0.9 plot inputa using ($2):($3/2) with boxes lc rgb "blue" title "Niederschlag",\ input using 2:5 with lines ls 1 title "Mitt. Lufttemp." # input using 2:3 with lines ls 1 title "Mitt. Max." ,\ # input using 2:4 with lines ls 2 title "Mitt. Min." set output