flat
parameter.¶Parameter flat
enables or disables geodesic lines on livemap.
Layers that support flat
parameter are geom_segment()
and geom_path()
:
False
(by default) - allows projection to curve a lineTrue
- keeps a line flatfrom lets_plot import *
LetsPlot.setup_html()
data = {
'lon': [-73.7997, -149.9002],
'lat': [40.6408, 61.2180],
}
By default a geodesic is drawn for geom_path()
and geom_segment()
on livemap. It is the shortest path between points on earth.
ggplot(data, aes(x='lon', y='lat')) + \
geom_livemap() + \
geom_path()
If it is necessary to indicate distances for example, travel routes, a straight line is better. This is how geom_path()
is rendered with parameter flat=True
on livemap.
ggplot(data, aes(x='lon', y='lat')) + \
geom_livemap() + \
geom_path(flat=True)