# command: load 'filename.plt' reset year='2017' print year input = 'files/noaa_'.year.'_wind_gnu.txt' print input set terminal windows 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.'_wind.jpg' print outfile set output outfile } #------------------------------------- if (out==2) { print '-----> Output: pdf ' set terminal pdf size 6,3.5 outfile = 'pdf/'.year.'_wind.pdf' print outfile set output outfile } #------------------------------------- set size 1,1 set origin 0.02,0.02 set xrange [0.5:12.5] yn=0 yx=20 set yrange [yn:yx] set y2range [0:100] set xtics 0,1,12 font ",14" set ytics yn,5,yx font ",14" set y2tics yn,10,100 textcolor "red" font ",14" #set y2tics yn,10,100 font ",14" set grid noxtics set grid ytics lw 1 lt 0 lc rgb "#000000" set ylabel "Mitt. Windgeschw. / km/h" font ",20" set y2label "Max. Windgeschw. / km/h" textcolor "red" font ",20" set xlabel "Monat" font ",20" set label year font ",25" at graph 0.4, 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 "black" lw 2 set style line 3 lt 1 lc rgb "blue" lw 2 set style line 4 lt 1 lc rgb "#000000" set boxwidth 0.50 relative set style fill transparent solid 0.5 noborder # Berechnung der y-Position für Wind-Labels labpos=yn+(yx-yn)*0.015 set label "Wind Dir" font ",9" at graph -0.13, graph 0.05 tc ls 4 set key font ",10" samplen 2 spacing 0.9 plot input using 2:4 with lines axes x1y2 ls 1 title "Max. Windgeschw.",\ input using 2:3 with lines axes x1y1 ls 2 title "Mitt. Windgeschw." ,\ input using 2:(labpos):6 with labels tc ls 4 offset 0.1 font ",10" left rotate by 90 notitle #set size ratio -1 # 'gs.png' binary filetype=png with rgbimage set output