First page Back Continue Last page Overview Image

Improving the Code

Not all the city names appear on the x axis of the previous plot.

We can change this by defining the xticks explicitly with "range(len((city_frame.index))".

Furthermore, we have to set use_index to True, so that we get city names and not numbers from 0 to len((city_frame.index):

city_frame.plot(xticks=range(len(city_frame.index)),

use_index=True)

New problem:

The city names are overlapping!