1begin capitalCity name 2 # Draw a labelled dot marking a capital city. 3 # 4 color "red" 5 box -1, -1, 1, 1 6 fill 7 8 clearpath 9 move 2, 0 10 font "Helvetica", 2.5 11 color "black" 12 label name 13end 14 15# Plot the geographic data in text file tutorialdatasets1.txt 16# in an Encapsulated PostScript file. 17# 18newpage "eps", "tutorialdatasets1.eps", 85, 85 19 20dataset "textfile", "tutorialdatasets1.txt", "comment=#" 21worlds 150, -45, 180, -5 22while Mapyrus.fetch.more 23do 24 # Draw label at each position read from text file. 25 # 26 fetch 27 print "DEBUG:", $0 28 clearpath 29 move parsegeo($2), parsegeo($1) 30 let cityAndCountryArray = split(substr($0, 16), "/") 31 capitalCity cityAndCountryArray[1] . "\n(" . cityAndCountryArray[2] . ")" 32done 33