Back to demo index

gnuplot demo script: hypertext.dem

autogenerated by webify.pl on Tue Jun 6 18:36:44 2017
gnuplot version gnuplot 5.2 patchlevel rc2
#
# 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


Click here for minimal script to generate this plot


set encoding save_encoding
reset