In [1]:
import numpy as np
from lets_plot import *
from lets_plot.geo_data import *
LetsPlot.setup_html()
The geodata is provided by © OpenStreetMap contributors and is made available here under the Open Database License (ODbL).
In [2]:
cities = geocode_cities(['Berlin', 'Sankt-Peterburg', 'Washington', 'Mbarara'])

The space between the point and the text is different for each object and gets bigger closer to the poles.

In [3]:
ggplot() + geom_livemap() + geom_point(map=cities, color='red') + geom_text(aes(label='found name'), map=cities, nudge_y = 5, color='red')
Out[3]:

When zooming with point scaling on, the text stays in the right place, but it does not scale.

In [4]:
ggplot() + geom_livemap() + geom_point(map=cities, color='red') + geom_text(aes(label='found name'), map=cities, nudge_y = 1, color='red')
Out[4]:

When zooming with point scaling off, it's good that the text doesn't scale. But the distance in pixels between the point and the text changes.

In [5]:
ggplot() + geom_livemap(const_size_zoomin=0) + geom_point(map=cities, color='red') + geom_text(aes(label='found name'), map=cities, nudge_y = 1, color='red')
Out[5]:
In [ ]: