Back to demo index

gnuplot demo script: hypertext.dem

autogenerated by webify.pl on Sun Sep 17 20:38:31 2023
gnuplot version gnuplot 6.0 patchlevel rc2
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:(Scale(3)) \
     with points pt 6 ps var lc rgb "black" lw 0.1


Click here for minimal script to generate this plot