# command: load 'filename.plt' reset year='2016' print year input = 'noaa_'.year.'_365.txt' print input out=0 # 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 1000,480 outfile = year.'_365.jpg' print outfile set output outfile } #------------------------------------- if (out==2) { print '-----> Output: pdf ' set terminal pdf size 6,3 outfile = year.'_365.pdf' print outfile set output outfile } #------------------------------------- set size 1,1 set origin 0.02,0.02 set xrange [1:365] set yrange [-10:45] set y2range [ ] set y2tics -20,5,45 font ",14" set xtics 0,50,365 font ",14" set ytics -20,5,45 font ",14" set grid noxtics set grid ytics lw 1 lt 0 lc rgb "#000000" set ylabel "Lufttemperatur / °C" font ",20" # set title "Januar 2015" font ",25" offset screen 2,25 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 1 set style line 2 lt 1 lc rgb "black" lw 1 set style line 3 lt 1 lc rgb "blue" lw 1 #MONTHS="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec" #pos2="1 32 60 91 121 152 182 213 244 274 305 335" #print MONTHS #print pos2 #set xtics ( "Jan" 15 ) #first one can't have `add`. #do for [i=1:11] { # which_month = word(MONTHS,i%12+1) # pos = i*30+15 #print pos # set xtics add ( which_month pos ) #} labelpos=-0.04 set xtics ("" 32, "" 60, "" 91, "" 121, "" 152, "" 182, "" 213, "" 244, "" 274, "" 305, "" 335) set label "Jan" font ",14" at 15.5 , graph labelpos center set label "Feb" font ",14" at 46 , graph labelpos center set label "Mär" font ",14" at 75.5 , graph labelpos center set label "Apr" font ",14" at 106 , graph labelpos center set label "Mai" font ",14" at 136.5, graph labelpos center set label "Jun" font ",14" at 167.5, graph labelpos center set label "Jul" font ",14" at 197.5, graph labelpos center set label "Aug" font ",14" at 228.5, graph labelpos center set label "Sep" font ",14" at 259 , graph labelpos center set label "Okt" font ",14" at 289.5, graph labelpos center set label "Nov" font ",14" at 320 , graph labelpos center set label "Dez" font ",14" at 350.5, graph labelpos center set key font ",10" samplen 3 spacing 0.9 plot input using 1:3 with lines ls 1 title "Max." ,\ input using 1:2 with lines ls 2 title "Mittel",\ input using 1:5 with lines ls 3 title "Min." set output