Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 619a92f9084d5359442c6f38b85238d7 > files > 128

gnuplot-nox-5.2.2-5.mga7.armv7hl.rpm

#
# Demonstrates how to attach hypertext to points so that
# the text is displayed on mouse-over.
# Not much to see here unless you are using the wxt, svg, qt,
# or HTML5 canvas terminal.
# 
set title 'Hypertext is shown when the mouse is over a point'

Scale(size) = 0.08*sqrt(sqrt(column(size)))
City(String,Size) = sprintf("%s\npop: %d", stringcolumn(String), column(Size))

set termoption enhanced
save_encoding = GPVAL_ENCODING
set encoding utf8
unset xtics
unset ytics
unset key
set border 0
set size square
set datafile separator "\t"

plot 'cities.dat' using 5:4:(City(1,3)):(Scale(3)) \
     with labels hypertext point pt 7 ps var lc rgb "#ffee99", \
     'cities.dat' using 5:4:(Scale(3)) \
     with points pt 6 ps var lc rgb "black" lw 0.1

pause -1 "hit return to continue"
set encoding save_encoding
reset