# set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 600, 400 # set output 'stringvar.2.png' unset border set label 1 "Exercise string handling functions" at graph 0.1, 0.95, 0 left norotate back nopoint set label 2 "" at graph 0.1, 0.9, 0 left norotate back nopoint set label 3 "foo = ABCDEF" at graph 0.1, 0.85, 0 left norotate back nopoint set label 4 "strlen(foo) = 6" at graph 0.1, 0.8, 0 left norotate back nopoint set label 5 "substr(foo,3,4) = CD" at graph 0.1, 0.75, 0 left norotate back nopoint set label 6 "" at graph 0.1, 0.7, 0 left norotate back nopoint set label 7 "haystack = `date`" at graph 0.1, 0.65, 0 left norotate back nopoint set label 8 "haystack = Thu Nov 15 12:12:38 PST 2018" at graph 0.1, 0.6, 0 left norotate back nopoint set label 9 "needle = :" at graph 0.1, 0.55, 0 left norotate back nopoint set label 10 "S = strstrt(haystack,needle) = 14" at graph 0.1, 0.5, 0 left norotate back nopoint set label 11 "haystack[S-2:S+2] = 12:12" at graph 0.1, 0.45, 0 left norotate back nopoint set label 12 "It is now 12:12" at graph 0.1, 0.4, 0 left norotate back nopoint set label 13 "" at graph 0.1, 0.35, 0 left norotate back nopoint set label 14 "words(haystack) = 6" at graph 0.1, 0.3, 0 left norotate back nopoint set label 15 "word(haystack,5) = PST" at graph 0.1, 0.25, 0 left norotate back nopoint set label 16 "" at graph 0.1, 0.2, 0 left norotate back nopoint set label 17 "sprintf output of long strings works OK" at graph 0.1, 0.15, 0 left norotate back nopoint set label 18 "" at graph 0.1, 0.1, 0 left norotate back nopoint set style increment default set style data lines unset xtics unset ytics set xrange [ * : * ] noreverse writeback set x2range [ * : * ] noreverse writeback set yrange [ 0.00000 : 1.00000 ] noreverse nowriteback set y2range [ * : * ] noreverse writeback set zrange [ * : * ] noreverse writeback set cbrange [ * : * ] noreverse writeback set rrange [ * : * ] noreverse writeback iswindows = 0 beg = 2 end = 4 foo = " 1 2 3 4 5 6" haystack = "Thu Nov 15 12:12:38 PST 2018" needle = ":" S = 14 plot 0 lc bgnd notitle