lets-plot
lets-plot copied to clipboard
coord_map() should distort tiles size to account for different unit size at different latitudes.
When tiles are used with coord_map
, gaps between tiles are getting bigger in higher latitudes:
import numpy as np
from lets_plot import *
from lets_plot.geo_data import *
# %%
step = 1
xs = np.arange(-125, -67, step)
ys = np.arange(25, 50, step)
xs, ys = np.meshgrid(xs, ys)
dat = dict(
x=xs.flatten(),
y=ys.flatten())
# %%
(ggplot(dat) +
geom_tile(aes("x", "y")) +
geom_map(map=geocode_states("us-48"), color="white", size="1") +
coord_map()).show()