lets-plot icon indicating copy to clipboard operation
lets-plot copied to clipboard

coord_map() should distort tiles size to account for different unit size at different latitudes.

Open alshan opened this issue 3 years ago • 0 comments

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()

image

alshan avatar Feb 18 '21 20:02 alshan