Back to demo index

gnuplot demo script: hypertext.dem

autogenerated by webify.pl on Fri Oct 28 21:17:11 2016
gnuplot version gnuplot 5.0 patchlevel 5
Your browser does not support the HTML 5 canvas element
          # unzoom rezoom zoom text ?
     
#
# 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:(City(1,3)):(Scale(3)) \
     with labels hypertext point pt 6 ps var lc rgb "black" lw 0.1


Click here for minimal script to generate this plot