1# 2# Demonstrates how to attach hypertext to points so that 3# the text is displayed on mouse-over. 4# Not much to see here unless you are using the wxt, svg, qt, 5# or HTML5 canvas terminal. 6# 7set title 'Hypertext is shown when the mouse is over a point' 8 9Scale(size) = 0.08*sqrt(sqrt(column(size))) 10City(String,Size) = sprintf("%s\npop: %d", stringcolumn(String), column(Size)) 11 12set termoption enhanced 13save_encoding = GPVAL_ENCODING 14set encoding utf8 15unset xtics 16unset ytics 17unset key 18set border 0 19set size square 20set datafile separator "\t" 21 22plot 'cities.dat' using 5:4:(City(1,3)):(Scale(3)) \ 23 with labels hypertext point pt 7 ps var lc rgb "#ffee99", \ 24 'cities.dat' using 5:4:(Scale(3)) \ 25 with points pt 6 ps var lc rgb "black" lw 0.1 26 27pause -1 "hit return to continue" 28set encoding save_encoding 29reset 30