Week 12: Exercises

1. Cities

Here is a file containing data about cities and towns around the world. (This data originally came from the World Cities Database.)

Write a program that reads the data and draws a GTK plot of all towns/cities with the following attributes:

Each city should appear as a dot whose area is proportional to the city's population. Leave 50 pixels of blank space around the plot.

Now modify your program so that if the user moves the mouse over a city, its name is displayed.