{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "lat = [48.979166, 48.936053, 29.875645, 35.309947]\n", "lon = [-102.492420, -80.237456, -114.032789, -123.242456]\n", "values = [700, 800, 1500, 200, 500]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "data = dict(y_start=lat[0:2], x_start=lon[0:2], y_end=lat[2:4], x_end=lon[2:4])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ggplot(data) \\\n", " + geom_livemap() \\\n", " + geom_segment(aes(x='x_start', y='y_start', xend='x_end', yend='y_end', color='y_end'), size=1, linetype=2) \\\n", " + ggtitle('Segments on livemap')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.10" } }, "nbformat": 4, "nbformat_minor": 1 }