File: cities.dem

package info (click to toggle)
gnuplot 5.0.5%2Bdfsg1-6%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,800 kB
  • ctags: 8,062
  • sloc: ansic: 78,152; cpp: 6,981; makefile: 2,075; sh: 1,343; lisp: 655; perl: 302; awk: 235; pascal: 194; tcl: 88; python: 46
file content (22 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# Demonstrates how to derive variable font size from a data file column.
# 
# If you are viewing this via the HTML canvas terminal, be sure to toggle
# the font scaling icon so that the fonts change size as you zoom in.
#
Scale(size) = 0.25*sqrt(sqrt(column(size)))
CityName(String,Size) = sprintf("{/=%d %s}", Scale(Size), stringcolumn(String))

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:($3 < 5000 ? "-" : CityName(1,3)) with labels
pause -1 "hit return to continue"
set encoding save_encoding
reset